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

Overview

Container module for routing spec functionality.

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Method Summary

Methods included from Matchers::RoutingMatchers::RouteHelpers

#delete, #get, #head, #options, #patch, #post, #put

Methods included from Matchers::RoutingMatchers

#be_routable, #route_to

Methods included from Matchers

#be_a_new, #be_new_record, #be_valid, #have_http_status

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



49
50
51
# File 'lib/rspec/rails/example/routing_example_group.rb', line 49

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

Instance Attribute Details

#routesObject

Returns the value of attribute routes.



39
40
41
# File 'lib/rspec/rails/example/routing_example_group.rb', line 39

def routes
  @routes
end