Skip to content

Commit d87cbcc

Browse files
authored
Merge pull request #914 from rubocop-hq/fix-edge-rubocop-0.84-offences-2
Fix specs for code transparently fixed with RuboCop 0.84 update
2 parents 378b67f + afe426c commit d87cbcc

30 files changed

+188
-271
lines changed

spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::Capybara::FeatureMethods, :config do
4-
subject(:cop) { described_class.new(config) }
5-
6-
let(:cop_config) { { 'EnabledMethods' => [] } }
7-
84
it 'flags violations for `background`' do
95
expect_offense(<<-RUBY)
106
describe 'some feature' do

spec/rubocop/cop/rspec/context_wording_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::ContextWording, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
let(:cop_config) { { 'Prefixes' => %w[when with] } }
75

86
it 'skips describe blocks' do

spec/rubocop/cop/rspec/described_class_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::DescribedClass, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
let(:cop_config) { {} }
75

86
context 'when SkipBlocks is `true`' do

spec/rubocop/cop/rspec/dialect_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::Dialect, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
let(:cop_config) do
75
{
86
'PreferredMethods' => {

spec/rubocop/cop/rspec/empty_example_group_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::EmptyExampleGroup, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
it 'flags an empty context' do
75
expect_offense(<<-RUBY)
86
describe Foo do

spec/rubocop/cop/rspec/empty_line_after_example_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::EmptyLineAfterExample, :config do
4-
subject(:cop) { described_class.new(config) }
5-
6-
let(:cop_config) { { 'AllowConsecutiveOneLiners' => true } }
7-
84
it 'flags a missing empty line after `it`' do
95
expect_offense(<<-RUBY)
106
RSpec.describe Foo do

spec/rubocop/cop/rspec/example_length_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::ExampleLength, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
let(:cop_config) { { 'Max' => 3 } }
75

86
it 'ignores non-spec blocks' do

spec/rubocop/cop/rspec/example_without_description_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RuboCop::Cop::RSpec::ExampleWithoutDescription, :config do
4-
subject(:cop) { described_class.new(config) }
5-
64
let(:cop_config) do
75
{ 'EnforcedStyle' => enforced_style }
86
end

0 commit comments

Comments
 (0)