Sha256: cb7754be14f6de5a210833cca80d06a6a8ba803991bca17928fd5eaf864f06b4

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

#
# Look in the page for a h1 tag with the "ActiveRecord Migration UI" text.
#
module BeTheActiveRecordMigrationUiGem
  extend RSpec::Matchers::DSL

  PAGE_TITLE = 'ActiveRecord Migration UI'.freeze

  matcher :be_the_active_record_migration_ui_gem do
    match do |page|
      begin
        page.find('h1', text: PAGE_TITLE)
        true
      rescue Capybara::ElementNotFound
        false
      end
    end
    failure_message do |page|
      "expected #{page.body} to have a h1 tag with the text " \
      "\"#{PAGE_TITLE}\" but did not"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_record_migration_ui-0.1.2 spec/support/be_the_active_record_migration_ui_gem_matcher.rb