Sha256: e5cd92eb939baac227ea7f05c9a09b997200debc86ef23ca099681d1e87dfce8
Contents?: true
Size: 825 Bytes
Versions: 7
Compression:
Stored size: 825 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module RSpec # Checks that the first argument to an example group is not empty. # # @example # # bad # describe do # end # # RSpec.describe do # end # # # good # describe TestedClass do # end # # describe "A feature example" do # end class MissingExampleGroupArgument < Cop MSG = 'The first argument to `%<method>s` should not be empty.'.freeze def on_block(node) return unless example_group?(node) return if node.send_node.arguments? add_offense(node, location: :expression, message: format(MSG, method: node.method_name)) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems