Sha256: 19cf3dded57fc3405a1125f115a7a46c3ea7d252ce27de9928a8e28bcd0c62d8

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

# Usage:
#
# describe "A feature" do
#   specify { page.should have_flash_message("foo") }
# end
RSpec::Matchers.define :have_flash_message do |message|
  match do
    within "div#flash-messages" do
      page.should have_content(message)
    end
  end

  description do
    %Q{have the following flash message: "#{message.inspect}"}
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongo_browser-0.1.3 spec/support/matchers/have_flash_message.rb
mongo_browser-0.1.2 spec/support/matchers/have_flash_message.rb
mongo_browser-0.1.1 spec/support/matchers/have_flash_message.rb
mongo_browser-0.1.0 spec/support/have_flash_message_matcher.rb