Module: Minitest::Assertions
- Defined in:
- lib/fog/test_helpers/minitest/assertions.rb
Instance Method Summary collapse
-
#assert_match_schema(actual, schema, message = nil, options = {}) ⇒ Object
Compares a hash’s structure against a reference schema hash and returns true when they match.
Instance Method Details
#assert_match_schema(actual, schema, message = nil, options = {}) ⇒ Object
Compares a hash’s structure against a reference schema hash and returns true when they match. Fog::Schema::Datavalidator is used for the validation.
6 7 8 9 10 |
# File 'lib/fog/test_helpers/minitest/assertions.rb', line 6 def assert_match_schema(actual, schema, = nil, = {}) validator = Fog::Schema::DataValidator.new = "expected:\n #{actual}\nto be equivalent of:\n#{schema}" assert(validator.validate(actual, schema, ), ) end |