test/plugin/test_exception_detector.rb in fluent-plugin-detect-exceptions-0.0.5 vs test/plugin/test_exception_detector.rb in fluent-plugin-detect-exceptions-0.0.6
- old
+ new
@@ -173,10 +173,37 @@
app/controllers/books_controller.rb:99:in `requestload'
app/controllers/books_controller.rb:118:in `generror'
config/error_reporting_logger.rb:62:in `tagged'
END
+ # The whitespace on the second line is significant.
+ RAILS_EXC = <<END.freeze
+ ActionController::RoutingError (No route matches [GET] "/settings"):
+
+ actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
+ actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
+ railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
+ actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
+ actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
+ rack (2.0.3) lib/rack/method_override.rb:22:in `call'
+ rack (2.0.3) lib/rack/runtime.rb:22:in `call'
+ activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
+ actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
+ rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
+ railties (5.1.4) lib/rails/engine.rb:522:in `call'
+ puma (3.10.0) lib/puma/configuration.rb:225:in `call'
+ puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
+ puma (3.10.0) lib/puma/server.rb:437:in `process_client'
+ puma (3.10.0) lib/puma/server.rb:301:in `block in run'
+ puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
+END
+
ARBITRARY_TEXT = <<END.freeze
This arbitrary text.
I am glad it contains no exception.
END
@@ -243,9 +270,10 @@
check_exception(GO_EXC, false)
end
def test_ruby
check_exception(RUBY_EXC, false)
+ check_exception(RAILS_EXC, false)
end
def test_mixed_languages
check_exception(JAVA_EXC, false)
check_exception(PYTHON_EXC, true)