Sha256: f869b99a3ff2ecd4694b0677da32d4277ff3ea71be20faa1689c4ba8b8141c71

Contents?: true

Size: 560 Bytes

Versions: 2

Compression:

Stored size: 560 Bytes

Contents

require 'helper'

describe Symbol, ".to_store" do
  it "should convert value to string" do
    ['foo', :foo].each do |value|
      described_class.to_store(value).should eq('foo')
    end
  end

  it "should be nil if nil" do
    described_class.to_store(nil).should be_nil
  end
end

describe Symbol, ".from_store" do
  it "should convert value to symbol" do
    ['foo', :foo].each do |value|
      described_class.from_store(value).should == :foo
    end
  end

  it "should return nil if nil" do
    described_class.from_store(nil).should be_nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toystore-0.13.2 spec/toy/extensions/symbol_spec.rb
toystore-0.13.1 spec/toy/extensions/symbol_spec.rb