tests/helpers/formats_helper.rb in fog-brightbox-1.10.0 vs tests/helpers/formats_helper.rb in fog-brightbox-1.11.0

- old
+ new

@@ -81,14 +81,14 @@ end # @deprecated #formats is deprecated. Use #data_matches_schema instead def formats(format, strict = true) test("has proper format") do - if strict - options = { :allow_extra_keys => false, :allow_optional_rules => true } - else - options = { :allow_extra_keys => true, :allow_optional_rules => true } - end + options = if strict + { allow_extra_keys: false, allow_optional_rules: true } + else + { allow_extra_keys: true, allow_optional_rules: true } + end validator = Fog::Schema::DataValidator.new valid = validator.validate(yield, format, options) @message = validator.message unless valid valid end