Sha256: 45c2e2d777a660d9a5439dd00f2de818fac5197ae6353ef48f67439f43455733
Contents?: true
Size: 379 Bytes
Versions: 2
Compression:
Stored size: 379 Bytes
Contents
require 'minitest_helper' describe Rasti::Types::Symbol do it 'nil -> nil' do Rasti::Types::Symbol.cast(nil).must_equal nil end ['text', :symbol, true, false, 100, Time.now, [1,2], {a: 1, b: 2}, Object.new].each do |value| it "#{value.inspect} -> \"#{value.to_s.to_sym}\"" do Rasti::Types::Symbol.cast(value).must_equal value.to_s.to_sym end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rasti-types-2.0.1 | spec/symbol_spec.rb |
rasti-types-2.0.0 | spec/symbol_spec.rb |