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.
30 31 32 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 30 def @failure_message end |
#negative_failure_message ⇒ Object (readonly)
Returns the value of attribute negative_failure_message.
30 31 32 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 30 def @negative_failure_message end |
Instance Method Details
#description ⇒ Object
32 33 34 35 36 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 32 def description description = "set the flash" description << " to #{@value.inspect}" unless @value.nil? description end |
#matches?(controller) ⇒ Boolean
25 26 27 28 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 25 def matches?(controller) @controller = controller sets_the_flash? && string_value_matches? && regexp_value_matches? end |
#to(value) ⇒ Object
20 21 22 23 |
# File 'lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb', line 20 def to(value) @value = value self end |