Skip to content
Snippets Groups Projects
Commit ad597b2d6b12 authored by Takuya Noguchi's avatar Takuya Noguchi
Browse files

Remove vendored spec/support/rubocop_helper.rb


Signed-off-by: default avatarTakuya Noguchi <takninnovationresearch@gmail.com>
parent 1cd965c175d9
No related branches found
No related tags found
2 merge requests!51Validate shift of Heptapod 0.25 to oldstable series,!41GitLab 13.12
require 'spec_helper'
require 'rubocop/rspec/cop_helper'
require 'rubocop/rspec/expect_offense'
require_relative '../../../lib/rubocop/cop/avoid_using_env'
......@@ -2,5 +5,4 @@
require_relative '../../../lib/rubocop/cop/avoid_using_env'
require_relative '../../support/rubocop_helper.rb'
RSpec.describe Rubocop::Cop::AvoidUsingEnv do
include CopHelper
......@@ -4,6 +6,7 @@
RSpec.describe Rubocop::Cop::AvoidUsingEnv do
include CopHelper
include RuboCop::RSpec::ExpectOffense
subject(:cop) { described_class.new }
......
......@@ -20,7 +20,6 @@
config.run_all_when_everything_filtered = true
config.include(GitlabSpec::Macros)
config.include ExpectOffense
config.disable_monkey_patching!
end
require 'rubocop/rspec/support'
# https://github.com/backus/rubocop-rspec/blob/master/spec/support/expect_offense.rb
# rubocop-rspec gem extension of RuboCop's ExpectOffense module.
#
# This mixin is the same as rubocop's ExpectOffense except the default
# filename ends with `_spec.rb`
module ExpectOffense
include RuboCop::RSpec::ExpectOffense
DEFAULT_FILENAME = 'example_spec.rb'.freeze
def expect_offense(source, filename = DEFAULT_FILENAME)
super
end
def expect_no_offenses(source, filename = DEFAULT_FILENAME)
super
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment