Module: RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers Private

Included in:
RoutingExampleGroup
Defined in:
lib/rspec/rails/matchers/routing_matchers.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Helpers for matching different route types.

Instance Method Summary collapse

Instance Method Details

#deleteObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#getObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#headObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#optionsObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#patchObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#postObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end

#putObject

Shorthand method for matching this type of route.



116
117
118
119
120
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 116

%w[get post put patch delete options head].each do |method|
  define_method method do |path|
    { method.to_sym => path }
  end
end