Sha256: de453040acdf888b57c6bac3b9960dae1d4a582a5c3626f33adc9fafaed67ccc

Contents?: true

Size: 990 Bytes

Versions: 70

Compression:

Stored size: 990 Bytes

Contents

# * Description: Base helper class for tests of examples schemas and templates.
#      Any tests should inherit from this class.
# * Author: Josh Bradley
# * License: Public Domain

require 'minitest/autorun'
require 'json'
require 'json-schema'
require File.join(File.dirname(__FILE__), '..', 'lib', 'adiwg-mdjson_schemas.rb')

class TestHelper < Minitest::Test
  @@dir = File.join(File.dirname(__FILE__), '..', '/')

  @@example = File.join(File.dirname(__FILE__), '..', 'examples/')

  @@schema = File.join(File.dirname(__FILE__), '..', 'schema', 'schema.json')

  @@strict = false

  # def self.load_json(filename)
  #   JSON.load File.new(filename)
  # end
  #
  # schemas = `git ls-files #{@@dir}/schema`.split($/)
  #
  # schemas.each do |schema|
  #   name = File.basename(schema)
  #   jschema = JSON::Schema.new(TestHelper.load_json(schema), Addressable::URI.parse(name))
  #
  #   JSON::Validator.add_schema(jschema)
  # end
  ADIWG::MdjsonSchemas::Utils.load_schemas(false)
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
adiwg-mdjson_schemas-2.9.6 test/helper.rb
adiwg-mdjson_schemas-2.10.1 test/helper.rb
adiwg-mdjson_schemas-2.9.2.pre.beta.21 test/helper.rb
adiwg-mdjson_schemas-2.9.2.pre.beta.20 test/helper.rb
adiwg-mdjson_schemas-2.9.2.pre.beta.19 test/helper.rb
adiwg-mdjson_schemas-2.9.1 test/helper.rb
adiwg-mdjson_schemas-2.9.0 test/helper.rb
adiwg-mdjson_schemas-2.8.1 test/helper.rb
adiwg-mdjson_schemas-2.8.0 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta9 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta8 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.rc8 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.rc7 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta6 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta3 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta2 test/helper.rb
adiwg-mdjson_schemas-2.8.0.pre.beta test/helper.rb
adiwg-mdjson_schemas-2.7.0 test/helper.rb
adiwg-mdjson_schemas-2.6.3 test/helper.rb
adiwg-mdjson_schemas-2.6.2 test/helper.rb