diff --git a/test/active_model_serializers/test/schema_test.rb b/test/active_model_serializers/test/schema_test.rb index 05234bb4c..161284372 100644 --- a/test/active_model_serializers/test/schema_test.rb +++ b/test/active_model_serializers/test/schema_test.rb @@ -102,14 +102,14 @@ def test_that_assert_with_a_custom_schema_directory end def test_with_a_non_existent_file - message = 'No such file or directory - No Schema file at test/support/schemas/non-existent.json' + message = %r{.* - No Schema file at test/support/schemas/non-existent.json} get :show error = assert_raises ActiveModelSerializers::Test::Schema::MissingSchema do assert_response_schema('non-existent.json') end - assert_equal(message, error.message) + assert_match(message, error.message) end def test_that_raises_with_a_invalid_json_body