lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.3.1 vs lib/rubocop/cop/rspec/describe_method.rb in rubocop-rspec-1.4.0

- old
+ new

@@ -1,6 +1,7 @@ # encoding: utf-8 +# frozen_string_literal: true module RuboCop module Cop module RSpec # Checks that the second argument to the top level describe is the tested @@ -19,10 +20,10 @@ # end class DescribeMethod < Cop include RuboCop::RSpec::TopLevelDescribe MESSAGE = 'The second argument to describe should be the method ' \ - "being tested. '#instance' or '.class'" + "being tested. '#instance' or '.class'".freeze METHOD_STRING_MATCHER = /^[\#\.].+/ def on_top_level_describe(_node, args) second_arg = args[1] return unless second_arg && second_arg.type == :str