Sha256: 3573cf4aa883c3a240f18cd13d5391912d9fd9984a2f9c2955acc7f2e02cb832

Contents?: true

Size: 399 Bytes

Versions: 23

Compression:

Stored size: 399 Bytes

Contents

require 'test_helper'

module Schemacop
  module V2
    class ValidatorSymbolTest < V2Test
      def test_basic
        s = Schema.new do
          type :symbol
        end

        assert_nothing_raised { s.validate!(:good) }
        assert_nothing_raised { s.validate!('-+/'.to_sym) }
        assert_verr { s.validate!('bad') }
        assert_verr { s.validate!(456) }
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
schemacop-3.0.16 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.15 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.14 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.13 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.12 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.11 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.10 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.9 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.8 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.7 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.6 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.5 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.4 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.3 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.2 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.1 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.0 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.0.rc5 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.0.rc4 test/unit/schemacop/v2/validator_symbol_test.rb
schemacop-3.0.0.rc3 test/unit/schemacop/v2/validator_symbol_test.rb