module MiniTest::Assertions

Public Instance Methods

assert_match_schema(actual, schema, message = nil, options = {}) click to toggle source

Compares a hash's structure against a reference schema hash and returns true when they match. Fog::Schema::Datavalidator is used for the validation.

# File lib/fog/test_helpers/minitest/assertions.rb, line 6
def assert_match_schema(actual, schema, message = nil, options = {})
  validator = Fog::Schema::DataValidator.new
  message = "expected:\n #{actual}\nto be equivalent of:\n#{schema}"
  assert(validator.validate(actual, schema, options), message)
end