Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix specs for code transparently fixed with RuboCop 0.84 update #914

Merged
merged 4 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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