Class: Peck::Should::Disallow

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

Constant Summary

Constants inherited from ResponseRequirement

ResponseRequirement::SUPPORTED_VERBS

Instance Attribute Summary

Attributes inherited from ResponseRequirement

#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 Method Details

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



293
294
295
296
297
298
299
# File 'lib/peck_on_rails.rb', line 293

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