我有这个rspec场景:
background do
Factory.create(:project, :name => "NAME", :url_name => "url name")
end
scenario "A not logged in user with no cookies goes to the root url and chooses a project", :js => true do
visit root_path
#^ this fires up a browser
...
end
当我在root_path命中的控制器操作中调用调试器时,不存在Project
。当我删除:js => true
时,项目确实存在。有什么建议吗?
我正在使用带有jquery和factory_girl_rails 1.0的rails 3