lib/cucumber/rails/action_controller.rb in cucumber-rails-1.7.0 vs lib/cucumber/rails/action_controller.rb in cucumber-rails-1.8.0
- old
+ new
@@ -1,13 +1,17 @@
+# frozen_string_literal: true
+
ActionController::Base.class_eval do
cattr_accessor :allow_rescue
end
-class ActionDispatch::ShowExceptions
- alias __cucumber_orig_call__ call
+module ActionDispatch
+ class ShowExceptions
+ alias __cucumber_orig_call__ call
- def call(env)
- env['action_dispatch.show_exceptions'] = !!ActionController::Base.allow_rescue
- env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
- __cucumber_orig_call__(env)
+ def call(env)
+ env['action_dispatch.show_exceptions'] = !!ActionController::Base.allow_rescue
+ env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
+ __cucumber_orig_call__(env)
+ end
end
end