Module: RSpec::Rails::Matchers::RoutingMatchers
- Extended by:
 - Matchers::DSL
 
- Included in:
 - ControllerExampleGroup, RoutingExampleGroup
 
- Defined in:
 - lib/rspec/rails/matchers/routing_matchers.rb
 
Overview
Matchers to help with specs for routing code.
Defined Under Namespace
Modules: RouteHelpers
Instance Method Summary collapse
- 
  
      #be_routable  ⇒ Object 
  
    
Passes if the route expression is recognized by the Rails router based on the declarations in
config/routes.rb. - 
  
      #route_to(*expected)  ⇒ Object 
  
    
Delegates to
assert_recognizes. 
Instance Method Details
#be_routable ⇒ Object
Passes if the route expression is recognized by the Rails router based on
the declarations in config/routes.rb. Delegates to
RouteSet#recognize_path.
      101 102 103  | 
    
      # File 'lib/rspec/rails/matchers/routing_matchers.rb', line 101 def be_routable BeRoutableMatcher.new(self) end  | 
  
#route_to(*expected) ⇒ Object
Delegates to assert_recognizes. Supports short-hand controller/action
declarations (e.g. "controller#action").
      61 62 63  | 
    
      # File 'lib/rspec/rails/matchers/routing_matchers.rb', line 61 def route_to(*expected) RouteToMatcher.new(self, *expected) end  |