Sha256: 922c25e25cced20e7e7c6b66494c0e771b103c542a3697ab092fe42fabf9250c

Contents?: true

Size: 580 Bytes

Versions: 1

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

feature 'show message', type: :feature do

  selectors = %w(error danger notice success)

  selectors.each do |selector|
    scenario "with valid selector" do
      visit home_path(message: selector)
      expect(page).to have_selector(".alert-message-#{selector}")
      expect(page).to have_text("test #{selector} message")
    end
  end

  scenario "with  invalid selector" do
    visit home_path(message: "wrong_selector")
    expect(page).to have_selector(".alert-message-notice")
    expect(page).to have_text("test wrong_selector message")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alert_message-1.1.8 spec/features/alert_message_spec.rb