Skip to content

Commit 30f0149

Browse files
code-bunnystas
authored andcommitted
updates specs to run on newer ruby versions
1 parent e6f7501 commit 30f0149

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

jsonapi.rb.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
3131
spec.add_development_dependency 'ransack'
3232
spec.add_development_dependency 'railties', ENV['RAILS_VERSION']
3333
spec.add_development_dependency 'activerecord', ENV['RAILS_VERSION']
34-
spec.add_development_dependency 'sqlite3', '~> 1.7'
34+
spec.add_development_dependency 'sqlite3', '~> 2.1'
3535
spec.add_development_dependency 'ffaker'
3636
spec.add_development_dependency 'rspec', '~> 3.0'
3737
spec.add_development_dependency 'rspec-rails'

lib/jsonapi/errors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def render_jsonapi_not_found(exception)
4747
render jsonapi_errors: [error], status: :not_found
4848
end
4949

50-
# Unprocessable entity (422) error handler callback
50+
# Unprocessable Content (422) error handler callback
5151
#
5252
# @param exception [Exception] instance to handle
5353
# @return [String] JSONAPI error response

spec/dummy.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ class UserSerializer
8484
end
8585

8686
class Dummy < Rails::Application
87-
secrets.secret_key_base = '_'
8887
config.hosts << 'www.example.com' if config.respond_to?(:hosts)
8988

9089
routes.draw do

spec/errors_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
{
3737
'status' => '422',
3838
'source' => { 'pointer' => '' },
39-
'title' => 'Unprocessable Entity',
39+
'title' => 'Unprocessable Content',
4040
'detail' => nil,
4141
'code' => nil
4242
}
@@ -63,7 +63,7 @@
6363
{
6464
'status' => '422',
6565
'source' => { 'pointer' => '/data/relationships/user' },
66-
'title' => 'Unprocessable Entity',
66+
'title' => 'Unprocessable Content',
6767
'detail' => expected_detail,
6868
'code' => 'blank'
6969
}
@@ -85,21 +85,21 @@
8585
{
8686
'status' => '422',
8787
'source' => { 'pointer' => '/data/attributes/title' },
88-
'title' => 'Unprocessable Entity',
88+
'title' => 'Unprocessable Content',
8989
'detail' => 'Title is invalid',
9090
'code' => 'invalid'
9191
},
9292
{
9393
'status' => '422',
9494
'source' => { 'pointer' => '/data/attributes/title' },
95-
'title' => 'Unprocessable Entity',
95+
'title' => 'Unprocessable Content',
9696
'detail' => 'Title has typos',
9797
'code' => 'invalid'
9898
},
9999
{
100100
'status' => '422',
101101
'source' => { 'pointer' => '/data/attributes/quantity' },
102-
'title' => 'Unprocessable Entity',
102+
'title' => 'Unprocessable Content',
103103
'detail' => 'Quantity must be less than 100',
104104
'code' => 'less_than'
105105
}
@@ -121,7 +121,7 @@
121121
{
122122
'status' => '422',
123123
'source' => { 'pointer' => '' },
124-
'title' => 'Unprocessable Entity',
124+
'title' => 'Unprocessable Content',
125125
'detail' => 'Title has slurs',
126126
'code' => 'title_has_slurs'
127127
}
@@ -144,7 +144,7 @@
144144
{
145145
'status' => '422',
146146
'source' => { 'pointer' => '/data/attributes/title' },
147-
'title' => 'Unprocessable Entity',
147+
'title' => 'Unprocessable Content',
148148
'detail' => nil,
149149
'code' => nil
150150
}

0 commit comments

Comments
 (0)