Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#### Fixes

* [#2767](https://github.com/ruby-grape/grape/pull/2767): Update rubocop to 1.88.0 and rubocop-rspec to 3.10.2 - [@ericproulx](https://github.com/ericproulx).
* Your contribution here.

### 3.3.0 (2026-06-20)
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ group :development, :test do
gem 'builder', require: false
gem 'bundler'
gem 'rake'
gem 'rubocop', '1.86.0', require: false
gem 'rubocop', '1.88.0', require: false
gem 'rubocop-performance', '1.26.1', require: false
gem 'rubocop-rspec', '3.9.0', require: false
gem 'rubocop-rspec', '3.10.2', require: false
end

group :development do
Expand Down
4 changes: 2 additions & 2 deletions spec/grape/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3691,8 +3691,8 @@ def self.call(object, _env)
mount app
end
expect(subject.routes.size).to eq(2)
expect(subject.routes.first.path).to match(%r{/cool/awesome})
expect(subject.routes.last.path).to match(%r{/cool/sauce})
expect(subject.routes.first.path).to include('/cool/awesome')
expect(subject.routes.last.path).to include('/cool/sauce')
end

it 'mounts on a path' do
Expand Down
2 changes: 1 addition & 1 deletion spec/grape/validations/params_scope_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(value)

get '/types', foo: 'invalid'
expect(last_response.status).to eq(400)
expect(last_response.body).to match(/foo is invalid/)
expect(last_response.body).to include('foo is invalid')
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/grape/validations/validators/oneof_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@
it 'rejects values that do not match any variant' do
post '/pricing', { value: { time_unit: 'hour', rate: 'not-a-number' } }.to_json, 'CONTENT_TYPE' => 'application/json'
expect(last_response.status).to eq(400)
expect(JSON.parse(last_response.body)['error']).to match(/does not match any of the allowed schemas/)
expect(JSON.parse(last_response.body)['error']).to include('does not match any of the allowed schemas')
end

it 'rejects values with no matching keys' do
post '/pricing', { value: { something_else: 1 } }.to_json, 'CONTENT_TYPE' => 'application/json'
expect(last_response.status).to eq(400)
expect(JSON.parse(last_response.body)['error']).to match(/does not match any of the allowed schemas/)
expect(JSON.parse(last_response.body)['error']).to include('does not match any of the allowed schemas')
end

it 'rejects when the value key is missing entirely' do
post '/pricing', '{}', 'CONTENT_TYPE' => 'application/json'
expect(last_response.status).to eq(400)
expect(JSON.parse(last_response.body)['error']).to match(/value is missing/)
expect(JSON.parse(last_response.body)['error']).to include('value is missing')
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/grape/validations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,8 @@ def validate_param!(attr_name, params)
it 'throws the validation errors' do
get '/two_required'
expect(last_response.status).to eq(400)
expect(last_response.body).to match(/yolo is missing/)
expect(last_response.body).to match(/swag is missing/)
expect(last_response.body).to include('yolo is missing')
expect(last_response.body).to include('swag is missing')
end
end

Expand Down
Loading