Class: Remarkable::Controller::Matchers::SetTheFlashTo

Inherits:
Matcher::Base
  • Object
show all
Includes:
Helpers
Defined in:
lib/remarkable/controller/macros/set_the_flash_to_matcher.rb

Instance Method Summary collapse

Methods included from Default::Helpers

#assert_contains, #assert_does_not_contain

Methods inherited from Matcher::Base

#failure_message, #negative, #negative_failure_message, #spec

Methods included from Matcher::DSL

included

Constructor Details

#initialize(val) ⇒ SetTheFlashTo

Returns a new instance of SetTheFlashTo.



7
8
9
# File 'lib/remarkable/controller/macros/set_the_flash_to_matcher.rb', line 7

def initialize(val)
  @val = val
end

Instance Method Details

#descriptionObject



20
21
22
# File 'lib/remarkable/controller/macros/set_the_flash_to_matcher.rb', line 20

def description
  expectation
end

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
# File 'lib/remarkable/controller/macros/set_the_flash_to_matcher.rb', line 11

def matches?(subject)
  initialize_with_spec!

  @subject = subject
  assert_matcher do
    flash_correct?
  end
end