aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/track_controller_spec.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-20 13:31:46 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-20 13:31:46 +0000
commit8932a6d67c4386a378783b8a6a1ded4d93c41891 (patch)
tree778785348cb01160de20fc21e6205676144ed553 /spec/controllers/track_controller_spec.rb
parent742ea045560f91e472901bea3d932669f1c50d61 (diff)
parent35a2c007a65ff20785e02b738077fe52efcb90bf (diff)
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r--spec/controllers/track_controller_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 90d13495f..ad4d651cb 100644
--- a/spec/controllers/track_controller_spec.rb
+++ b/spec/controllers/track_controller_spec.rb
@@ -46,7 +46,9 @@ describe TrackController, "when sending alerts for a track" do
it "should send alerts" do
# Don't do clever locale-insertion-unto-URL stuff
- ActionController::Routing::Routes.filters.clear
+ old_filters = ActionController::Routing::Routes.filters
+ ActionController::Routing::Routes.filters = RoutingFilter::Chain.new
+
# set the time the comment event happened at to within the last week
ire = info_request_events(:silly_comment_event)
ire.created_at = Time.now - 3.days
@@ -91,6 +93,9 @@ describe TrackController, "when sending alerts for a track" do
TrackMailer.alert_tracks
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 0
+
+ # Restore the routing filters
+ ActionController::Routing::Routes.filters = old_filters
end
it "should send localised alerts" do