Module: Spree::Core::TestingSupport::Flash

Defined in:
lib/spree/core/testing_support/flash.rb

Instance Method Summary collapse

Instance Method Details

#assert_flash_notice(flash) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/spree/core/testing_support/flash.rb', line 5

def assert_flash_notice(flash)
  if flash.is_a?(Symbol)
    flash = I18n.t(flash)
  end

  within("[class='flash notice']") do
    page.should have_content(flash)
  end
end