class Shoulda::Matchers::ActionController::SetFlashMatcher
@private
Attributes
Public Class Methods
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
Source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 190 def [](key) @key = key underlying_matcher[key] self end
Source
# File lib/shoulda/matchers/action_controller/set_flash_matcher.rb, line 185 def in_context(context) underlying_matcher.in_context(context) self end
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
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