Class: Peck::Should::RequireLogin

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

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

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



53
54
55
56
57
58
59
# File 'lib/peck_on_rails/assertions.rb', line 53

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