Sha256: 029288d534b3e421892476e7d2707a44e3dd09ae1d4e88f1cdc597b449791e69

Contents?: true

Size: 365 Bytes

Versions: 2

Compression:

Stored size: 365 Bytes

Contents

require 'minitest_helper'

describe Rasti::Types::String do

  it 'nil -> nil' do
    Rasti::Types::String.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}\"" do
      Rasti::Types::String.cast(value).must_equal value.to_s
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rasti-types-2.0.1 spec/string_spec.rb
rasti-types-2.0.0 spec/string_spec.rb