trabajo-afectivo/spec/support/allow_forgery_protection.rb

12 lines
305 B
Ruby
Raw Normal View History

RSpec.configure do |config|
config.around(:each, :allow_forgery_protection) do |example|
orig = ActionController::Base.allow_forgery_protection
ActionController::Base.allow_forgery_protection = true
example.run
ensure
ActionController::Base.allow_forgery_protection = orig
end
end