Sha256: 5a2be6e5e3886c46ac7dcb3ee7e03d72ab6459932d08f63fcd8b0733844d6f34

Contents?: true

Size: 518 Bytes

Versions: 64

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

require 'capybara/rspec/matchers/base'

module Capybara
  module RSpecMatchers
    module Matchers
      class HaveTitle < WrappedElementMatcher
        def element_matches?(el)
          el.assert_title(*@args)
        end

        def element_does_not_match?(el)
          el.assert_no_title(*@args)
        end

        def description
          "have title #{title.inspect}"
        end

      private

        def title
          @args.first
        end
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 4 rubygems

Version Path
isomorfeus-puppetmaster-0.5.7 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.6 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.5 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.4 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.3 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.2 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.1 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.5.0 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.4.1 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.4.0 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_title.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.5 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.4 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.3 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.2 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.1 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb
capybara-3.30.0 lib/capybara/rspec/matchers/have_title.rb
tdiary-5.1.0 vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_title.rb
isomorfeus-puppetmaster-0.3.0 lib/isomorfeus/puppetmaster/rspec/matchers/have_title.rb