summaryrefslogtreecommitdiff
path: root/spec/rubocop
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 18:08:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 18:08:47 +0000
commit6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (patch)
tree883e9db60c047c54418fc1d2b1c5517f97e0f185 /spec/rubocop
parent23288f62da73fb0e30d8e7ce306665e8fda1b932 (diff)
downloadgitlab-ce-6b9d3a4e8351e662c4586b24bb152de78ae9e3bf.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r--spec/rubocop/cop/include_action_view_context_spec.rb45
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/rubocop/cop/include_action_view_context_spec.rb b/spec/rubocop/cop/include_action_view_context_spec.rb
deleted file mode 100644
index c888555b54f..00000000000
--- a/spec/rubocop/cop/include_action_view_context_spec.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require 'rubocop'
-require 'rubocop/rspec/support'
-
-require_relative '../../../rubocop/cop/include_action_view_context'
-
-describe RuboCop::Cop::IncludeActionViewContext do
- include CopHelper
-
- subject(:cop) { described_class.new }
-
- context 'when `ActionView::Context` is included' do
- let(:source) { 'include ActionView::Context' }
- let(:correct_source) { 'include ::Gitlab::ActionViewOutput::Context' }
-
- it 'registers an offense' do
- inspect_source(source)
-
- aggregate_failures do
- expect(cop.offenses.size).to eq(1)
- expect(cop.offenses.map(&:line)).to eq([1])
- expect(cop.highlights).to eq(['ActionView::Context'])
- end
- end
-
- it 'autocorrects to the right version' do
- autocorrected = autocorrect_source(source)
-
- expect(autocorrected).to eq(correct_source)
- end
- end
-
- context 'when `ActionView::Context` is not included' do
- it 'registers no offense' do
- inspect_source('include Context')
-
- aggregate_failures do
- expect(cop.offenses.size).to eq(0)
- end
- end
- end
-end