Module: RSpec::Rails::RoutingExampleGroup

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

Defined Under Namespace

Modules: ClassMethods

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, #be_valid

Methods included from MinitestLifecycleAdapter

#after_setup, #after_teardown, #before_setup, #before_teardown

Methods included from SetupAndTeardownAdapter

#method_name

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(m, *args, &block) (private)

50
51
52
# File 'lib/rspec/rails/example/routing_example_group.rb', line 50
def method_missing(m, *args, &block)
  routes.url_helpers.respond_to?(m) ? routes.url_helpers.send(m, *args) : super
end

Instance Attribute Details

- (Object) routes

Returns the value of attribute routes

40
41
42
# File 'lib/rspec/rails/example/routing_example_group.rb', line 40
def routes
  @routes
end