Class: Remarkable::Controller::Matchers::SetSessionMatcher
- Inherits:
-
Matcher::Base
- Object
- Matcher::Base
- Remarkable::Controller::Matchers::SetSessionMatcher
- Includes:
- Helpers
- Defined in:
- lib/remarkable/controller/macros/set_session_matcher.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
-
#initialize(key, expected = nil, &block) ⇒ SetSessionMatcher
constructor
A new instance of SetSessionMatcher.
- #matches?(subject) ⇒ Boolean
Methods included from Default::Helpers
#assert_contains, #assert_does_not_contain
Methods inherited from Matcher::Base
#negative, #negative_failure_message, #spec
Methods included from Matcher::DSL
Constructor Details
#initialize(key, expected = nil, &block) ⇒ SetSessionMatcher
Returns a new instance of SetSessionMatcher.
7 8 9 10 11 |
# File 'lib/remarkable/controller/macros/set_session_matcher.rb', line 7 def initialize(key, expected=nil, &block) @key = key @expected = expected @expected = block if block_given? end |
Instance Method Details
#description ⇒ Object
23 24 25 |
# File 'lib/remarkable/controller/macros/set_session_matcher.rb', line 23 def description expectation end |
#failure_message ⇒ Object
27 28 29 |
# File 'lib/remarkable/controller/macros/set_session_matcher.rb', line 27 def @missing end |
#matches?(subject) ⇒ Boolean
13 14 15 16 17 18 19 20 21 |
# File 'lib/remarkable/controller/macros/set_session_matcher.rb', line 13 def matches?(subject) @subject = subject initialize_with_spec! assert_matcher do has_session_key? end end |