test/unit/schemacop/v3/symbol_node_test.rb in schemacop-3.0.16 vs test/unit/schemacop/v3/symbol_node_test.rb in schemacop-3.0.17
- old
+ new
@@ -2,11 +2,11 @@
module Schemacop
module V3
class SymbolNodeTest < V3Test
def self.invalid_type_error(type)
- type = type.class unless type.class == Class
+ type = type.class unless type.instance_of?(Class)
"Invalid type, got type \"#{type}\", expected \"Symbol\"."
end
def test_basic
schema :symbol
@@ -23,10 +23,10 @@
end
def test_required
schema :symbol, required: true
assert_validation :foo
- assert_validation ''.to_sym
+ assert_validation :""
assert_validation nil do
error '/', 'Value must be given.'
end
end