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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

%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.



112
113
114
115
116
# File 'lib/rspec/rails/matchers/routing_matchers.rb', line 112

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