Skip to content
Browse files

restored the ability to use method missing matchers like be_blank or …

…be_true in before blocks for routing example groups
  • Loading branch information...
1 parent b8b7dd9 commit c1c2f606eba41be720224aa1f972ea0730d3c489 @deadlyicon deadlyicon committed Nov 8, 2011
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/rspec/rails/example/routing_example_group.rb
View
9 lib/rspec/rails/example/routing_example_group.rb
@@ -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
@@ -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.
Something went wrong with that request. Please try again.