lib/rubocop/cop/discourse/time_eq_matcher.rb in rubocop-discourse-2.3.1 vs lib/rubocop/cop/discourse/time_eq_matcher.rb in rubocop-discourse-2.3.2
- old
+ new
@@ -1,19 +1,19 @@
# frozen_string_literal: true
module RuboCop
module Cop
module Discourse
- # Use `time_eq` matcher with timestamps in specs.
+ # Use `eq_time` matcher with timestamps in specs.
#
# @example
# # bad
# expect(user.created_at).to eq(Time.zone.now)
#
# # good
# expect(user.created_at).to eq_time(Time.zone.now)
class TimeEqMatcher < Cop
- MSG = "Use time_eq when testing timestamps"
+ MSG = "Use eq_time when testing timestamps"
def_node_matcher :using_eq_matcher_with_timestamp?, <<-MATCHER
(send
(send nil? :expect
(send ... #timestamp_suffix?))