Sha256: 82884638350b0960e0d975c3e9259878c11f879edcfd31135c33114a8ac4ed3d

Contents?: true

Size: 579 Bytes

Versions: 6

Compression:

Stored size: 579 Bytes

Contents

require 'spec_helper'

describe DataMapper::Property::Decimal do
  before :all do
    @name          = :rate
    @type          = described_class
    @options       = { :precision => 5, :scale => 2 }
    @primitive     = BigDecimal
    @value         = BigDecimal('1.0')
    @other_value   = BigDecimal('2.0')
    @invalid_value = true
  end

  it_should_behave_like 'A public Property'

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

    it { should be_kind_of(Hash) }

    it { should eql(:primitive => @primitive, :precision => 10, :scale => 0) }
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ardm-core-1.3.0 spec/public/property/decimal_spec.rb
ardm-core-1.2.1 spec/public/property/decimal_spec.rb
dm-core-1.2.1 spec/public/property/decimal_spec.rb
dm-core-1.2.0 spec/public/property/decimal_spec.rb
dm-core-1.2.0.rc2 spec/public/property/decimal_spec.rb
dm-core-1.2.0.rc1 spec/public/property/decimal_spec.rb