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

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

Overview

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