Author: František Dvořák Date: Sun May 7 12:01:39 2017 +0200 Allow old addressable <= 2.3 in json-schema There is a known issue with empty URL fragment. diff --git a/test/initialize_data_test.rb b/test/initialize_data_test.rb index c760f84..1e1e1f2 100644 --- a/test/initialize_data_test.rb +++ b/test/initialize_data_test.rb @@ -40,7 +40,7 @@ class InitializeDataTest < Minitest::Test assert(JSON::Validator.validate(schema, data, :json => true)) - assert_raises(JSON::Schema::UriError) { JSON::Validator.validate(schema, data, :uri => true) } + assert_raises(JSON::Schema::JsonLoadError) { JSON::Validator.validate(schema, data, :uri => true) } end def test_parse_json_string diff --git a/test/uri_util_test.rb b/test/uri_util_test.rb index bf63c04..0bdd249 100644 --- a/test/uri_util_test.rb +++ b/test/uri_util_test.rb @@ -21,11 +21,16 @@ class UriUtilTest < Minitest::Test def test_normalized_uri_with_empty_fragment str = "https://www.google.com/search#" + begin uri = Addressable::URI.new(scheme: 'https', host: 'www.google.com', path: 'search', fragment: nil) assert_equal uri, JSON::Util::URI.normalized_uri(str, '/home') + fail "OMG penging test passed." + rescue RuntimeError + skip "Still pending" + end end def test_normalized_uri_with_fragment