I have this rspec scenario:
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
When I call the debugger in the controller action that gets hit for the root_path, no Projects exist. When I remove the :js => true, the project does exist. Any suggestions?
I’m using rails 3 with jquery and factory_girl_rails 1.0
You need to disable transactional fixtures. See https://github.com/lailsonbm/contact_manager_app