Skip to content

Commit

Permalink
Debug json generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ipepe committed Jan 8, 2024
1 parent b0b5ea7 commit 7d30ff7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/rspec/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
end

it 'generates the same spec/rails/doc/openapi.json' do
org_yaml = JSON.parse(File.read(openapi_path))
org_json = JSON.parse(File.read(openapi_path))
rspec 'spec/requests/rails_spec.rb', openapi: true, output: :json
new_yaml = JSON.parse(File.read(openapi_path))
expect(new_yaml).to eq org_yaml
new_json = JSON.parse(File.read(openapi_path).tap {|j| puts j; puts j.inspect })

Check notice

Code scanning / Rubocop

Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Note test

Layout/SpaceInsideBlockBraces: Space between { and | missing.

Check notice

Code scanning / Rubocop

Don't use semicolons to terminate expressions. Note test

Style/Semicolon: Do not use semicolons to terminate expressions.
expect(new_json).to eq org_json
end
end

Expand Down

0 comments on commit 7d30ff7

Please sign in to comment.