test/catcher_test.rb in hoptoad_notifier-2.4.10 vs test/catcher_test.rb in hoptoad_notifier-2.4.11
- old
+ new
@@ -110,9 +110,11 @@
klass.local = opts[:local]
controller = klass.new
controller.stubs(:rescue_action_in_public_without_hoptoad)
opts[:request].query_parameters = opts[:request].query_parameters.merge(opts[:params] || {})
opts[:request].session = ActionController::TestSession.new(opts[:session] || {})
+ # Prevents request.fullpath from crashing Rails in tests
+ opts[:request].env['REQUEST_URI'] = opts[:request].request_uri
controller.process(opts[:request], opts[:response])
controller
end
def process_action_with_manual_notification(args = {})