spec/unit/loga/rack/logger_spec.rb in loga-2.1.1 vs spec/unit/loga/rack/logger_spec.rb in loga-2.1.2
- old
+ new
@@ -94,9 +94,18 @@
let(:options) { { 'action_dispatch.exception' => exception } }
include_examples 'logs the event', level: :info
end
+ context 'when the exception is on rack.exception', focus: true do
+ let(:response_status) { 500 }
+ let(:exception) { StandardError }
+ let(:logged_exception) { exception }
+ let(:options) { { 'rack.exception' => exception } }
+
+ include_examples 'logs the event', level: :error
+ end
+
context 'when no exception is raised' do
include_examples 'logs the event', level: :info
end
context 'when the logger is tagged' do