lib/rubocop/cop/rspec/describe_class.rb in rubocop-rspec-1.32.0 vs lib/rubocop/cop/rspec/describe_class.rb in rubocop-rspec-1.33.0
- old
+ new
@@ -18,20 +18,20 @@
# end
class DescribeClass < Cop
include RuboCop::RSpec::TopLevelDescribe
MSG = 'The first argument to describe should be '\
- 'the class or module being tested.'.freeze
+ 'the class or module being tested.'
def_node_matcher :valid_describe?, <<-PATTERN
{
- (send {(const nil? :RSpec) nil?} :describe const ...)
- (send {(const nil? :RSpec) nil?} :describe)
+ (send #{RSPEC} :describe const ...)
+ (send #{RSPEC} :describe)
}
PATTERN
def_node_matcher :describe_with_metadata, <<-PATTERN
- (send {(const nil? :RSpec) nil?} :describe
+ (send #{RSPEC} :describe
!const
...
(hash $...))
PATTERN