Before do ApplicationController.stub_any_instance(:protect_against_forgery? => Capybara.javascript_test?) end