debian-mirror-gitlab/spec/support/forgery_protection.rb
2017-09-10 17:25:29 +05:30

11 lines
273 B
Ruby

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