diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-07-26 13:34:52 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-27 11:32:44 +0300 |
commit | bfe8b96874c66c54e2e4c1a66a520087b217e9e7 (patch) | |
tree | e7623d413e8ac605bd810b903303990dfb1e3927 /spec/support | |
parent | dcf4a2e83c69d1be0915f9c4c4f023abee2e7dea (diff) |
Add specs
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/forgery_protection.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/forgery_protection.rb b/spec/support/forgery_protection.rb new file mode 100644 index 00000000000..a5e7b761651 --- /dev/null +++ b/spec/support/forgery_protection.rb @@ -0,0 +1,11 @@ +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 |