Sha256: c1e17729ec7c10d00d9bbe559f60e20e8956c55047af0042545a32e2b11162a9

Contents?: true

Size: 1.16 KB

Versions: 28

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      module Capybara
        # @!parse
        #   # Checks for usage of deprecated style methods.
        #   #
        #   # @example when using `assert_style`
        #   #   # bad
        #   #   page.find(:css, '#first').assert_style(display: 'block')
        #   #
        #   #   # good
        #   #   page.find(:css, '#first').assert_matches_style(display: 'block')
        #   #
        #   # @example when using `has_style?`
        #   #   # bad
        #   #   expect(page.find(:css, 'first')
        #   #     .has_style?(display: 'block')).to be true
        #   #
        #   #   # good
        #   #   expect(page.find(:css, 'first')
        #   #     .matches_style?(display: 'block')).to be true
        #   #
        #   # @example when using `have_style`
        #   #   # bad
        #   #   expect(page).to have_style(display: 'block')
        #   #
        #   #   # good
        #   #   expect(page).to match_style(display: 'block')
        #   #
        #   class MatchStyle < ::RuboCop::Cop::Base; end
        MatchStyle = ::RuboCop::Cop::Capybara::MatchStyle
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/capybara/match_style.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.22.0 lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.21.0 lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.20.0 lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.19.0 lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.18.1 lib/rubocop/cop/rspec/capybara/match_style.rb
rubocop-rspec-2.18.0 lib/rubocop/cop/rspec/capybara/match_style.rb