Class: RSpec::Rails::HyperShortcut::RequestPair

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/rails/extra/routing/hyper_shortcut/request_pair.rb

Instance Method Summary collapse

Constructor Details

#initialize(method, path) ⇒ RequestPair

Returns a new instance of RequestPair.



3
4
5
6
# File 'lib/rspec/rails/extra/routing/hyper_shortcut/request_pair.rb', line 3

def initialize(method,path)
  @method = method
  @path = path
end

Instance Method Details

#to_hashObject



8
9
10
# File 'lib/rspec/rails/extra/routing/hyper_shortcut/request_pair.rb', line 8

def to_hash
  {@method => @path}
end

#to_sObject



12
13
14
# File 'lib/rspec/rails/extra/routing/hyper_shortcut/request_pair.rb', line 12

def to_s
  "#{@method.to_s.upcase} #{@path}"
end