Class: Shoulda::Matchers::ActionController::SetSessionMatcher

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/shoulda/matchers/action_controller/set_session_matcher.rb

Instance Method Summary collapse

Constructor Details

#initializeSetSessionMatcher

Returns a new instance of SetSessionMatcher.



137
138
139
140
# File 'lib/shoulda/matchers/action_controller/set_session_matcher.rb', line 137

def initialize
  store = SessionStore.new
  @underlying_matcher = SetSessionOrFlashMatcher.new(store)
end

Instance Method Details

#[](key) ⇒ Object



147
148
149
150
# File 'lib/shoulda/matchers/action_controller/set_session_matcher.rb', line 147

def [](key)
  underlying_matcher[key]
  self
end

#in_context(context) ⇒ Object



142
143
144
145
# File 'lib/shoulda/matchers/action_controller/set_session_matcher.rb', line 142

def in_context(context)
  underlying_matcher.in_context(context)
  self
end

#to(expected_value = nil, &block) ⇒ Object



152
153
154
155
# File 'lib/shoulda/matchers/action_controller/set_session_matcher.rb', line 152

def to(expected_value = nil, &block)
  underlying_matcher.to(expected_value, &block)
  self
end