Sha256: 19519243a44247906a9532834d25d68c377435529faf2c2fb73e85fe3ea20ad4

Contents?: true

Size: 602 Bytes

Versions: 24

Compression:

Stored size: 602 Bytes

Contents

require 'helper'

describe "String.to_store" do
  it "should convert value to_s" do
    [21, '21'].each do |value|
      String.to_store(value).should == '21'
    end
  end

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

describe "String.from_store" do
  it "should be string if value present" do
    String.from_store('Scotch! Scotch! Scotch!').should == 'Scotch! Scotch! Scotch!'
  end

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

  it "should return empty string if blank" do
    String.from_store('').should == ''
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
toystore-0.13.2 spec/toy/extensions/string_spec.rb
toystore-0.13.1 spec/toy/extensions/string_spec.rb
toystore-0.13.0 spec/toy/extensions/string_spec.rb
toystore-0.12.0 spec/toy/extensions/string_spec.rb
toystore-0.11.0 spec/toy/extensions/string_spec.rb
toystore-0.10.4 spec/toy/extensions/string_spec.rb
toystore-0.10.3 spec/toy/extensions/string_spec.rb
toystore-0.10.2 spec/toy/extensions/string_spec.rb
toystore-0.10.1 spec/toy/extensions/string_spec.rb
toystore-0.10.0 spec/toy/extensions/string_spec.rb
toystore-0.9.0 spec/toy/extensions/string_spec.rb
toystore-0.8.3 spec/toy/extensions/string_spec.rb
toystore-0.8.2 spec/toy/extensions/string_spec.rb
toystore-0.8.1 spec/toy/extensions/string_spec.rb
toystore-0.8.0 spec/toy/extensions/string_spec.rb
toystore-0.7.0 spec/toy/extensions/string_spec.rb
toystore-0.6.6 spec/toy/extensions/string_spec.rb
toystore-0.6.5 spec/toy/extensions/string_spec.rb
toystore-0.6.4 spec/toy/extensions/string_spec.rb
toystore-0.6.3 spec/toy/extensions/string_spec.rb