diff --git a/spec/routing/routes_spec.rb b/spec/routing/routes_spec.rb index a32c6dd..00c16b7 100644 --- a/spec/routing/routes_spec.rb +++ b/spec/routing/routes_spec.rb @@ -66,9 +66,13 @@ end context "with default configuration disabled" do - before do + around do |example| + cached_high_voltage_routes = HighVoltage.routes HighVoltage.routes = false Rails.application.reload_routes! + example.run + HighVoltage.routes = cached_high_voltage_routes + Rails.application.reload_routes! end it "should not recognize routes" do