I have the following:
setup do
Capybara.current_driver = Capybara.javascript_driver
@project.user = @user
@project.save
Project.any_instance.stubs(:price_all)
end
And yet I have a test failing because the Project.price_all method is being run:
/Users/me/code/rails/myapp/app/models/project.rb:178:in `price_all'
This was working properly until I upgraded to Capybara 2 and the latest version of capybara-webkit.
Why is that method still being run? And how can I fix?