Class: Shoulda::ActionController::Matchers::SetTheFlashMatcher
- Inherits:
-
Object
- Object
- Shoulda::ActionController::Matchers::SetTheFlashMatcher
- Defined in:
- lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#failure_message ⇒ Object
readonly
Returns the value of attribute failure_message.
-
#negative_failure_message ⇒ Object
readonly
Returns the value of attribute negative_failure_message.
Instance Method Summary collapse
Instance Attribute Details
#failure_message ⇒ Object (readonly)
Returns the value of attribute failure_message.
36 37 38 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 36 def @failure_message end |
#negative_failure_message ⇒ Object (readonly)
Returns the value of attribute negative_failure_message.
36 37 38 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 36 def @negative_failure_message end |
Instance Method Details
#description ⇒ Object
38 39 40 41 42 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 38 def description description = "set the flash" description << " to #{@value.inspect}" unless @value.nil? description end |
#matches?(controller) ⇒ Boolean
31 32 33 34 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 31 def matches?(controller) @controller = controller sets_the_flash? && string_value_matches? && regexp_value_matches? end |
#now ⇒ Object
26 27 28 29 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 26 def now @now = true self end |
#to(value) ⇒ Object
21 22 23 24 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 21 def to(value) @value = value self end |