Sha256: 9af926c7acf9c6a2d845f3980ee2680388bda564af344fe45e274ea48ff53cf0

Contents?: true

Size: 383 Bytes

Versions: 20

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    module Language
      # Helper methods to detect RSpec DSL used with send and block
      module NodePattern
        def send_pattern(string)
          "(send #rspec? #{string} ...)"
        end

        def block_pattern(string)
          "(block #{send_pattern(string)} ...)"
        end
      end
    end
  end
end

Version data entries

20 entries across 18 versions & 2 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-rspec-2.12.1/lib/rubocop/rspec/language/node_pattern.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-rspec-2.9.0/lib/rubocop/rspec/language/node_pattern.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-rspec-2.12.1/lib/rubocop/rspec/language/node_pattern.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-rspec-2.9.0/lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.12.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.12.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.11.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.11.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.10.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.9.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.8.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.7.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.6.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.5.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.4.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.3.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.2.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.1.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.0.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-2.0.0 lib/rubocop/rspec/language/node_pattern.rb