Sha256: cfe853220bf2397222cc754c0c5d33b988e11fbabc3fbf6f296166dec7ad6aba

Contents?: true

Size: 737 Bytes

Versions: 24

Compression:

Stored size: 737 Bytes

Contents

require 'helper'

describe "Integer.to_store" do
  it "should convert value to integer" do
    [21, 21.0, '21'].each do |value|
      Integer.to_store(value).should == 21
    end
  end

  it "should work fine with big integers" do
    [9223372036854775807, '9223372036854775807'].each do |value|
      Integer.to_store(value).should == 9223372036854775807
    end
  end
end

describe "Integer.from_store" do
  it "should convert value to integer" do
    [21, 21.0, '21'].each do |value|
      Integer.from_store(value).should == 21
    end
  end

  it "should work fine with big integers" do
    [9223372036854775807, '9223372036854775807'].each do |value|
      Integer.from_store(value).should == 9223372036854775807
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

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