Skip to content

Commit

Permalink
Merge pull request #31 from rubocop/fix-internal-affair-example-descr…
Browse files Browse the repository at this point in the history
…iption-offenses

Fix InternalAffairs/ExampleDescription offenses
  • Loading branch information
ydah authored May 20, 2024
2 parents 225b71a + e7f28cf commit 29eb4d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/rubocop/cop/rspec_rails/inferred_spec_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

describe 'with redundant type in keyword arguments' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User, type: :model do
^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -26,7 +26,7 @@
end

describe 'with redundant type in Hash arguments' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User, { type: :model } do
^^^^^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -41,7 +41,7 @@
end

describe 'with redundant type before other Hash metadata' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User, type: :model, other: true do
^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -56,7 +56,7 @@
end

describe 'with redundant type after other Hash metadata' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User, other: true, type: :model do
^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -71,7 +71,7 @@
end

describe 'with redundant type and other Symbol metadata' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User, :other, type: :model do
^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -86,7 +86,7 @@
end

describe 'with redundant type and receiver-less describe' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
describe User, type: :model do
^^^^^^^^^^^^ Remove redundant spec type.
Expand All @@ -101,7 +101,7 @@
end

describe 'with redundant type in inner example group' do
it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/models/user_spec.rb')
RSpec.describe User do
describe 'inner', type: :model do
Expand All @@ -128,7 +128,7 @@
}
end

it 'register and corrects an offense' do
it 'registers and corrects an offense' do
expect_offense(<<~RUBY, '/path/to/project/spec/services/user_spec.rb')
RSpec.describe User, type: :service do
^^^^^^^^^^^^^^ Remove redundant spec type.
Expand Down

0 comments on commit 29eb4d3

Please sign in to comment.