123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: rspec-rails/lib/rspec/rails/matchers/routing_matchers.rb

Overview

Helpers for matching different route types.

Instance Method Summary

  • #delete

    Shorthand method for matching this type of route.

  • #get

    Shorthand method for matching this type of route.

  • #head

    Shorthand method for matching this type of route.

  • #options

    Shorthand method for matching this type of route.

  • #patch

    Shorthand method for matching this type of route.

  • #post

    Shorthand method for matching this type of route.

  • #put

    Shorthand method for matching this type of route.

Instance Method Details

#delete

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#get

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#head

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#options

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#patch

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#post

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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

#put

Shorthand method for matching this type of route.

[ GitHub ]

  
# File 'rspec-rails/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