Class: Peck::Should::Response

Inherits:
ResponseRequirement show all
Defined in:
lib/peck_on_rails/assertions.rb

Constant Summary

Constants inherited from ResponseRequirement

Peck::Should::ResponseRequirement::SUPPORTED_VERBS

Instance Attribute Summary collapse

Attributes inherited from ResponseRequirement

#allowed_exceptions, #expected, #method

Instance Method Summary collapse

Methods inherited from ResponseRequirement

#define_specification, #method_missing, supported_verbs

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Peck::Should::ResponseRequirement

Instance Attribute Details

#verb_descriptionObject

Returns the value of attribute verb_description


73
74
75
# File 'lib/peck_on_rails/assertions.rb', line 73

def verb_description
  @verb_description
end

Instance Method Details

#description(verb, action, params = {}) ⇒ Object


75
76
77
78
79
80
81
# File 'lib/peck_on_rails/assertions.rb', line 75

def description(verb, action, params={})
  description = ["should"]
  description << "not" if (negated == false)
  description << "#{verb_description} `#{action}'"
  description << "#{params.inspect}" unless params.blank?
  description.join(' ')
end