我正在学习Ruby,必须做一些家庭作业,但在执行代码时遇到问题。我搜索了这个论坛和谷歌,发现这可能是不同的Ruby版本的问题,但我不知道如何解决这个问题。我试着执行:Ruby版本的问题
cucumber features/filter_movie_list.feature
,并得到这个:
而且我不应该看到的 'G' # 功能/ step_definitions/movie_steps.rb:32 没有这样的文件来加载 - - RSpec的/匹配器/ BUILT_IN /有(LoadError) ./features/step_definitions/movie_steps.rb:34:in
/^(?:|I)should not see '([^']*)'$/' features/filter_movie_list.feature:37:in
我不应该看到的 'G'”
有人可以帮助我解决这个proble米或给我链接解决方案?
编辑: movie_steps.rb有关此TAKS是:
Then /^(?:|I)should not see '([^']*)'$/ do |text|
if page.respond_to? :should
page.find('#movies').should have_no_content(text)
else
assert page.find('#movies').has_no_content?(text)
end
end
你能更清楚你应该做什么? – uday 2012-03-24 15:11:16
显示你的'movie_steps.rb' – 2012-03-24 17:20:37
我编辑的问题。但我找到了解决办法。解决方案是在Gemfile中添加rspec gem。 – 2012-03-24 18:08:49