Commit 6e05bfe3 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'fast_spec_helper_fix' into 'master'

Use fast_spec_helper for rubocop specs

See merge request gitlab-org/gitlab!37912
parents ae657908 868c633e
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize' require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize'
RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize, type: :rubocop do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
...@@ -62,7 +61,7 @@ RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do ...@@ -62,7 +61,7 @@ RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do
end end
end end
RUBY RUBY
expect_next_instance_of(described_class) do |instance| expect_any_instance_of(described_class) do |instance|
expect(instance).to receive(:add_offense).once expect(instance).to receive(:add_offense).once
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_return_from_blocks' require_relative '../../../rubocop/cop/avoid_return_from_blocks'
RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks, type: :rubocop do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
...@@ -29,7 +28,7 @@ RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do ...@@ -29,7 +28,7 @@ RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do
end end
end end
RUBY RUBY
expect_next_instance_of(described_class) do |instance| expect_any_instance_of(described_class) do |instance|
expect(instance).to receive(:add_offense).once expect(instance).to receive(:add_offense).once
end end
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/migration/drop_table' require_relative '../../../../rubocop/cop/migration/drop_table'
RSpec.describe RuboCop::Cop::Migration::DropTable do RSpec.describe RuboCop::Cop::Migration::DropTable, type: :rubocop do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment