Skip to content

Commit

Permalink
Prefer Array#to_set to Set.new for symbols array definition
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Dec 3, 2022
1 parent fdb58d0 commit 424aa4d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/rubocop/cop/rspec/rails/travel_around.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ class TravelAround < Base

MSG = 'Prefer to travel in `before` rather than `around`.'

TRAVEL_METHOD_NAMES = Set.new(
%i[
freeze_time
travel
travel_to
]
)
TRAVEL_METHOD_NAMES = %i[
freeze_time
travel
travel_to
].to_set.freeze

def on_block(node)
send_node = match_run_in_travel(node)
Expand Down

0 comments on commit 424aa4d

Please sign in to comment.