Permalink
Browse files

Fixed failing spec for disabling routes

  • Loading branch information...
1 parent 545a401 commit c5d4c9c97b399b77b4596db7ba3c8e91c594d1ba @harlow harlow committed Oct 29, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 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

0 comments on commit c5d4c9c

Please sign in to comment.