allow_forgery_protection.rb 305 B

1234567891011
  1. RSpec.configure do |config|
  2. config.around(:each, :allow_forgery_protection) do |example|
  3. orig = ActionController::Base.allow_forgery_protection
  4. ActionController::Base.allow_forgery_protection = true
  5. example.run
  6. ensure
  7. ActionController::Base.allow_forgery_protection = orig
  8. end
  9. end