summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb (renamed from spec/rubocop/cop/module_with_instance_variables_spec.rb)40
1 files changed, 2 insertions, 38 deletions
diff --git a/spec/rubocop/cop/module_with_instance_variables_spec.rb b/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb
index df5e2dd2f04..1fd40653f79 100644
--- a/spec/rubocop/cop/module_with_instance_variables_spec.rb
+++ b/spec/rubocop/cop/gitlab/module_with_instance_variables_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
-require_relative '../../../rubocop/cop/module_with_instance_variables'
+require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables'
-describe RuboCop::Cop::ModuleWithInstanceVariables do
+describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables do
include CopHelper
subject(:cop) { described_class.new }
@@ -83,42 +83,6 @@ describe RuboCop::Cop::ModuleWithInstanceVariables do
end
end
- context 'with regular ivar assignment' do
- let(:source) do
- <<~RUBY
- module M
- def f
- @f = true
- end
- end
- RUBY
- end
-
- context 'when source is offending but it is a rails helper' do
- before do
- allow(cop).to receive(:rails_helper?).and_return(true)
- end
-
- it_behaves_like 'not registering offense'
- end
-
- context 'when source is offending but it is a rails mailer' do
- before do
- allow(cop).to receive(:rails_mailer?).and_return(true)
- end
-
- it_behaves_like 'not registering offense'
- end
-
- context 'when source is offending but it is a spec helper' do
- before do
- allow(cop).to receive(:spec_helper?).and_return(true)
- end
-
- it_behaves_like 'not registering offense'
- end
- end
-
context 'when source is using simple or ivar assignment' do
it_behaves_like 'not registering offense' do
let(:source) do