class Shoulda::Matchers::ActionController::SetFlashMatcher
@private
Attributes
expected_value[R]
key[R]
underlying_matcher[R]
Public Class Methods
new()
click to toggle source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 170 def initialize store = FlashStore.future @underlying_matcher = SetSessionOrFlashMatcher.new(store) end
Public Instance Methods
[](key)
click to toggle source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 190 def [](key) @key = key underlying_matcher[key] self end
in_context(context)
click to toggle source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 185 def in_context(context) underlying_matcher.in_context(context) self end
now()
click to toggle source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 175 def now if key || expected_value raise QualifierOrderError end store = FlashStore.now @underlying_matcher = SetSessionOrFlashMatcher.new(store) self end
to(expected_value = nil, &block)
click to toggle source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 196 def to(expected_value = nil, &block) @expected_value = expected_value underlying_matcher.to(expected_value, &block) self end