Skip to content

Commit

Permalink
Merge pull request #914 from rubocop-hq/fix-edge-rubocop-0.84-offences-2
Browse files Browse the repository at this point in the history
Fix specs for code transparently fixed with RuboCop 0.84 update
  • Loading branch information
pirj committed May 24, 2020
2 parents 378b67f + afe426c commit d87cbcc
Show file tree
Hide file tree
Showing 30 changed files with 188 additions and 271 deletions.
4 changes: 0 additions & 4 deletions spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::Capybara::FeatureMethods, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'EnabledMethods' => [] } }

it 'flags violations for `background`' do
expect_offense(<<-RUBY)
describe 'some feature' do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/context_wording_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::ContextWording, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'Prefixes' => %w[when with] } }

it 'skips describe blocks' do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/described_class_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::DescribedClass, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { {} }

context 'when SkipBlocks is `true`' do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/dialect_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::Dialect, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) do
{
'PreferredMethods' => {
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/empty_example_group_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::EmptyExampleGroup, :config do
subject(:cop) { described_class.new(config) }

it 'flags an empty context' do
expect_offense(<<-RUBY)
describe Foo do
Expand Down
4 changes: 0 additions & 4 deletions spec/rubocop/cop/rspec/empty_line_after_example_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::EmptyLineAfterExample, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'AllowConsecutiveOneLiners' => true } }

it 'flags a missing empty line after `it`' do
expect_offense(<<-RUBY)
RSpec.describe Foo do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/example_length_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::ExampleLength, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) { { 'Max' => 3 } }

it 'ignores non-spec blocks' do
Expand Down
2 changes: 0 additions & 2 deletions spec/rubocop/cop/rspec/example_without_description_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::RSpec::ExampleWithoutDescription, :config do
subject(:cop) { described_class.new(config) }

let(:cop_config) do
{ 'EnforcedStyle' => enforced_style }
end
Expand Down

0 comments on commit d87cbcc

Please sign in to comment.