Module: ElabsMatchers::Matchers::HaveFlash

Defined in:
lib/elabs_matchers/matchers/have_flash.rb

Defined Under Namespace

Classes: HaveFlashMatcher

Instance Method Summary collapse

Instance Method Details

#have_flash_alert(message) ⇒ Object

Asserts if the supplied flash alert exists or not

Example: page.should have_flash_alert(“Error”)

Parameters:

  • message (String)

    The content of the flash alert



64
65
66
# File 'lib/elabs_matchers/matchers/have_flash.rb', line 64

def have_flash_alert(message)
  HaveFlashMatcher.new(:alert, message)
end

#have_flash_notice(message) ⇒ Object

Asserts if the supplied flash notice exists or not

Example: page.should have_flash_notice(“Success”)

Parameters:

  • message (String)

    The content of the flash notice



51
52
53
# File 'lib/elabs_matchers/matchers/have_flash.rb', line 51

def have_flash_notice(message)
  HaveFlashMatcher.new(:notice, message)
end