Sha256: c192c56a67ff24c75587a6834e20f932f930904d921fe3d56bf9fd3b63e5d3d7

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

require_relative '../../spec_helper'

describe DataMapper::Property::Float do
  before :all do
    @name          = :rating
    @type          = described_class
    @load_as       = Float
    @dump_as       = String
    @value         = 0.1
    @other_value   = 0.2
    @invalid_value = '1'
  end

  it_behaves_like 'A public Property'

  describe '.options' do
    subject { described_class.options }

    it { is_expected.to be_kind_of(Hash) }
    it { is_expected.to eql(load_as: @load_as, dump_as: @load_as, precision: 10, scale: nil) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sbf-dm-core-1.3.0 spec/public/property/float_spec.rb
sbf-dm-core-1.3.0.beta spec/public/property/float_spec.rb