Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Mar 17, 2017
1 parent 632dc7b commit a1fcebf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/timber/probes/action_dispatch_debug_exceptions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def method_for_action(action_name)
it "should set the context" do
mock_class
dispatch_rails_request("/exception")

# Because constantly updating the line numbers sucks :/
expect(io.string).to include("RuntimeError (boom) @metadata")
expect(io.string).to include("\"event\":{\"server_side_app\":{\"exception\":{\"name\":\"RuntimeError\",\"message\":\"boom\",\"backtrace\":[{\"file\":\"lib/timber/probes/action_controller_user_context.rb\",\"line\":33,\"function\":\"_timber_capture_user_context\"},")
expect(io.string).to include("\"event\":{\"server_side_app\":{\"exception\":{\"name\":\"RuntimeError\",\"message\":\"boom\",\"backtrace\":[{\"file\":\"lib/timber/probes/action_controller_user_context.rb\",\"line\":42,\"function\":\"_timber_capture_user_context\"},{\"file\":\"lib/timber/rack_middlewares/http_context.rb\",\"line\":18,\"function\":\"block in call\"},{\"file\":\"lib/timber/current_context.rb\",\"line\":65,\"function\":\"with\"},{\"file\":\"lib/timber/current_context.rb\",\"line\":18,\"function\":\"with\"},{\"file\":\"lib/timber/rack_middlewares/http_context.rb\",\"line\":17,\"function\":\"call\"}]}}}")
end

def mock_class
Expand Down

0 comments on commit a1fcebf

Please sign in to comment.