Sha256: 3e56b51d793cc6f8213e3f585d9560507c3526aa045a99239600271f7d68b9e6

Contents?: true

Size: 545 Bytes

Versions: 14

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'

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

  it_should_behave_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, :coercion_method => :to_float, :precision => 10, :scale => nil) }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ardm-0.4.0.ar427 spec/public/property/float_spec.rb
ardm-0.4.0 spec/public/property/float_spec.rb
ardm-0.3.2 spec/public/property/float_spec.rb
ardm-0.3.1 spec/public/property/float_spec.rb
ardm-0.3.0 spec/public/property/float_spec.rb
ardm-0.2.7 spec/public/property/float_spec.rb
ardm-0.2.6 spec/public/property/float_spec.rb
ardm-0.2.5 spec/public/property/float_spec.rb
ardm-0.2.4 spec/public/property/float_spec.rb
ardm-0.2.3 spec/public/property/float_spec.rb
ardm-0.2.2 spec/public/property/float_spec.rb
ardm-0.2.1 spec/public/property/float_spec.rb
ardm-0.2.0 spec/public/property/float_spec.rb
ardm-0.1.0 spec/public/property/float_spec.rb