Sha256: 5ee7054d1075e21267554218b90a4cb56cd9438f076768af95356b32f22bb26e

Contents?: true

Size: 326 Bytes

Versions: 22

Compression:

Stored size: 326 Bytes

Contents

require 'spec_helper'
describe Upsert do
  describe "is precise" do
    it "stores small numbers precisely" do
      small = -0.00000000634943
      upsert = Upsert.new $conn, :pets
      upsert.row({:name => 'NotJerry'}, :lovability => small)
      Pet.first.lovability.should be_within(1e-11).of(small) # ?
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
upsert-1.1.1 spec/precision_spec.rb
upsert-1.1.0 spec/precision_spec.rb