Skip to content

Commit

Permalink
spec/unit/rails/breakdown_subscriber: cleanup properly
Browse files Browse the repository at this point in the history
Setting nil leaves the `routes` key, which is violating the clean state
principle.
  • Loading branch information
kyrylo committed Mar 11, 2019
1 parent ce37bc3 commit 701f055
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'airbrake/rails/action_controller_performance_breakdown_subscriber'

RSpec.describe Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber do
after { Airbrake::Rack::RequestStore[:routes] = nil }
after { Airbrake::Rack::RequestStore.clear }

context "when routes are not set in the request store" do
before { Airbrake::Rack::RequestStore[:routes] = nil }
Expand Down

0 comments on commit 701f055

Please sign in to comment.