Skip to content

Commit

Permalink
lint: fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
Don-CA committed Sep 14, 2023
1 parent 7d36d93 commit 9d97b13
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "ruby_lsp",
"name": "Debug",
"request": "launch",
"program": "bin/rails s"
},
{
"type": "ruby_lsp",
"name": "Debug test file",
"request": "launch",
"program": "bundle exec rspec ${relativeFile}"
},
{
"type": "ruby_lsp",
"name": "Attach",
"request": "attach"
}
]
}
10 changes: 5 additions & 5 deletions spec/openapi_contracts/doc/path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let(:schema) do
{
'paths' => {
'/messages/{id}' => {
'/messages/{id}' => {
'parameters' => [id_param].compact
},
'/messages/{id}/{second_id}' => {
Expand Down Expand Up @@ -59,11 +59,11 @@
end
end

describe "#path_regexp" do
subject { doc.with_path("/messages/{id}/{second_id}").path_regexp.match("/messages/123/abc").captures }
describe '#path_regexp' do
subject { doc.with_path('/messages/{id}/{second_id}').path_regexp.match('/messages/123/abc').captures }

it "matches both parameters" do
expect(subject).to eq(["123", "abc"])
it 'matches both parameters' do
expect(subject).to eq %w(123 abc)
end
end
end

0 comments on commit 9d97b13

Please sign in to comment.