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 InternalAffairs/ExampleDescription offenses #31

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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