Module: RSpec::Rails::RoutingExampleGroup

Extended by:
ActiveSupport::Concern
Includes:
ActionDispatch::Assertions::RoutingAssertions, Matchers::RoutingMatchers, Matchers::RoutingMatchers::RouteHelpers, RailsExampleGroup
Defined in:
lib/rspec/rails/example/routing_example_group.rb

Instance Attribute Summary collapse

Method Summary

Methods included from Matchers::RoutingMatchers

#be_routable, #route_to

Methods included from Matchers

#be_a_new, #be_new_record

Methods included from TestUnitAssertionAdapter

#assertion_delegator

Methods included from SetupAndTeardownAdapter

#method_name

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object (private)



23
24
25
# File 'lib/rspec/rails/example/routing_example_group.rb', line 23

def method_missing(m, *args, &block)
  routes.url_helpers.respond_to?(m) ? routes.url_helpers.send(m, *args) : super
end

Instance Attribute Details

#routesObject (readonly)

Returns the value of attribute routes.



19
20
21
# File 'lib/rspec/rails/example/routing_example_group.rb', line 19

def routes
  @routes
end