Sha256: 6f5c1a9b5a11e81a22d04ba7f16aab5fdaef5f86f12d71ba55a71b0ab9b44ea6
Contents?: true
Size: 1015 Bytes
Versions: 5
Compression:
Stored size: 1015 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module RSpec module Rails # @!parse # # Prefer to travel in `before` rather than `around`. # # # # @safety # # This cop is unsafe because the automatic `travel_back` is only # # run on test cases that are considered as Rails related. # # # # And also, this cop's autocorrection is unsafe because the order # # of execution will change if other steps exist before traveling # # in `around`. # # # # @example # # # bad # # around do |example| # # freeze_time do # # example.run # # end # # end # # # # # good # # before { freeze_time } # # # class TravelAround < RuboCop::Cop::RSpec::Base; end TravelAround = ::RuboCop::Cop::RSpecRails::TravelAround end end end end
Version data entries
5 entries across 5 versions & 1 rubygems