Sha256: aac51e822fd04ee1a36d76dae5ffef1787a07f6b098727f9db4b16c8f74372c8

Contents?: true

Size: 534 Bytes

Versions: 13

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    module Language
      # Common node matchers used for matching against the rspec DSL
      module NodePattern
        extend RuboCop::NodePattern::Macros

        def_node_matcher :example_group?, ExampleGroups::ALL.block_pattern

        def_node_matcher :example_group_with_body?, <<-PATTERN
          (block #{ExampleGroups::ALL.send_pattern} args [!nil?])
        PATTERN

        def_node_matcher :example?, Examples::ALL.block_pattern
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rubocop-rspec-1.27.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.26.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.25.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.25.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.24.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.23.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.22.2 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.22.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.22.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.21.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.20.1 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.20.0 lib/rubocop/rspec/language/node_pattern.rb
rubocop-rspec-1.19.0 lib/rubocop/rspec/language/node_pattern.rb