Skip to content

Commit

Permalink
Revert "restored the ability to use method missing matchers like be_b…
Browse files Browse the repository at this point in the history
…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 rspec#460.
  • Loading branch information
dchelimsky committed Dec 4, 2011
1 parent c5c576b commit eb08f7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/rspec/rails/example/routing_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.