Navigation Menu

Skip to content

Commit

Permalink
restored the ability to use method missing matchers like be_blank or …
Browse files Browse the repository at this point in the history
…be_true in before blocks for routing example groups
  • Loading branch information
jaredatron committed Nov 8, 2011
1 parent b8b7dd9 commit c1c2f60
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/rspec/rails/example/routing_example_group.rb
Expand Up @@ -9,7 +9,10 @@ module RoutingExampleGroup
include RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers

module InstanceMethods
attr_reader :routes

def routes
@routes ||= ::Rails.application.routes
end

private

Expand All @@ -20,10 +23,6 @@ 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 c1c2f60

Please sign in to comment.