Class: HyperSpec::RespondsWith

Inherits:
Have
  • Object
show all
Defined in:
lib/hyperspec.rb

Instance Attribute Summary

Attributes inherited from Have

#proxy

Instance Method Summary collapse

Methods inherited from Have

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HyperSpec::Have

Instance Method Details

#status(status_code_symbol) ⇒ Object



257
258
259
260
261
262
263
264
# File 'lib/hyperspec.rb', line 257

def status(status_code_symbol)
  if STATI.has_value?(status_code_symbol)
    proxy.status.must_equal(status_code_symbol)
  else
    raise UnkownStatusCodeError,
      "Status code #{status_code_symbol.inspect} is unkown."
  end
end