Skip to content

Commit

Permalink
Fix rubocop CI (#910)
Browse files Browse the repository at this point in the history
* Fix RSpec/ExampleWording warning using auto-correct

* Disable Capybara/NegationMatcher
  • Loading branch information
m-nakamura145 authored Feb 5, 2024
1 parent 2ec6714 commit 58d8499
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rubocop-challenger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Create Pull Request
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.rails50
RUBY_VERSION: 3.2.3
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
RUBY_VERSION: 3.2.3
steps:
- uses: actions/checkout@v3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
{ required: false, default_value: nil }
end

it 'will not warn' do
it 'does not warn' do
expect { subject }.not_to output(
/is optional but default value is not specified/
).to_stderr
Expand All @@ -130,7 +130,7 @@
{ required: false, default_value: 123 }
end

it 'will not warn' do
it 'does not warn' do
expect { subject }.not_to output(
/is optional but default value is not specified/
).to_stderr
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/swagger/swagger_dsl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def have_field?(field, expected_name, breadcrumb)
expect(schema).to have_field(:pet_id, 'number', {:description => 'id of pet'})
expect(schema).to have_field(:pet_name, 'string', {:description => 'Name of pet', :required => false})
expect(schema).to have_field(:animal_type, 'string', {:description => 'Type of pet', :enum => %w[dog cat iguana kangaroo]})
expect(schema).not_to have_field(:partial_match_allowed, 'boolean', {:required => false})
expect(schema).not_to have_field(:partial_match_allowed, 'boolean', {:required => false}) # rubocop:disable Capybara/NegationMatcher
end

it "creates a swagger definition with all input parameters" do
Expand Down

0 comments on commit 58d8499

Please sign in to comment.