File: relative_definition_test.rb

package info (click to toggle)
ruby-json-schema 2.8.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 896 kB
  • sloc: ruby: 5,806; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.expand_path('../support/test_helper', __FILE__)

class RelativeDefinitionTest < Minitest::Test

  def test_definition_schema
    assert_valid schema_fixture_path('definition_schema.json'), {"a" => 5}
  end

  def test_definition_schema_with_special_characters
    assert_valid schema_fixture_path('definition_schema_with_special_characters.json'), {"a" => 5}
  end

  def test_relative_definition
    schema = schema_fixture_path('relative_definition_schema.json')
    assert_valid schema, {"a" => 5}
    refute_valid schema, {"a" => "foo"}
  end

end