Permalink
Browse files

Revert "restored the ability to use method missing matchers like be_b…

…lank or be_true in before blocks for routing example groups"

This reverts commit c1c2f60.

Unfortunately, there is code outside rspec's control that refers
directly to the instance variable, so this change ends up breaking more
than it fixes.

- Reopens #460.
  • Loading branch information...
1 parent c5c576b commit eb08f7dc9c044a0f689ac4e383861280b5bcfc74 @dchelimsky dchelimsky committed Dec 4, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/rspec/rails/example/routing_example_group.rb
@@ -9,10 +9,7 @@ module RoutingExampleGroup
include RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers
module InstanceMethods
-
- def routes
- @routes ||= ::Rails.application.routes
- end
+ attr_reader :routes
private
@@ -23,6 +20,10 @@ def method_missing(m, *args, &block)
included do
metadata[:type] = :routing
+
+ before do
+ @routes = ::Rails.application.routes
+ end
end
end
end

0 comments on commit eb08f7d

Please sign in to comment.