Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubocop/cop/rspec/timecop_freeze_spec.rb')
-rw-r--r--spec/rubocop/cop/rspec/timecop_freeze_spec.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/rubocop/cop/rspec/timecop_freeze_spec.rb b/spec/rubocop/cop/rspec/timecop_freeze_spec.rb
deleted file mode 100644
index 4361f587da3..00000000000
--- a/spec/rubocop/cop/rspec/timecop_freeze_spec.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-require 'rubocop_spec_helper'
-
-require_relative '../../../../rubocop/cop/rspec/timecop_freeze'
-
-RSpec.describe RuboCop::Cop::RSpec::TimecopFreeze do
- context 'when calling Timecop.freeze' do
- it 'registers an offense and corrects', :aggregate_failures do
- expect_offense(<<~CODE)
- Timecop.freeze(Time.current) { example.run }
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use `Timecop.freeze`, use `freeze_time` instead. [...]
- CODE
-
- expect_correction(<<~CODE)
- freeze_time(Time.current) { example.run }
- CODE
- end
- end
-
- context 'when calling a different method on Timecop' do
- it 'does not register an offense' do
- expect_no_offenses(<<~CODE)
- Timecop.travel(Time.current)
- CODE
- end
- end
-end