我试图在预期路径上做一个简单的断言。
在我的步骤定义文件中,根据水豚文档:
Then /^I should be on the login page/ do
current_path.should == new_session_path
end这将返回
undefined method `new_session_path' for #<Cucumber::Rails::World:0x0000010340b4c0> (NoMethodError)它看起来好像没有加载路由助手..
发布于 2012-07-01 08:57:41
这是个脑筋急转弯。真的很抱歉。我很长一段时间没有意识到的一个细节是,我遇到了rails的引擎隔离问题。具体地说,我在测试refinerycms时遇到了这里描述的问题:https://github.com/resolve/refinerycms/issues/1259
因此,修复它非常简单:
current_path.should == refinery.admin_root_pathhttps://stackoverflow.com/questions/11271720
复制相似问题