We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95f832f commit c1fc0e4Copy full SHA for c1fc0e4
test/active_model_serializers/test/schema_test.rb
@@ -115,15 +115,16 @@ def test_with_a_non_existent_file
115
end
116
117
def test_that_raises_with_a_invalid_json_body
118
- message = 'A JSON text must at least contain two octets!'
+ # message changes from JSON gem 2.0.2 to 2.2.0
119
+ message = /A JSON text must at least contain two octets!|an unexpected token at ''/
120
121
get :invalid_json_body
122
123
error = assert_raises ActiveModelSerializers::Test::Schema::InvalidSchemaError do
124
assert_response_schema('custom/show.json')
125
126
- assert_equal(message, error.message)
127
+ assert_match(message, error.message)
128
129
130
0 commit comments