Sha256: bca34032b3b96e788c14b19bd3afe4f95780ec9e0b8ab50b279e7c39a1409355

Contents?: true

Size: 324 Bytes

Versions: 25

Compression:

Stored size: 324 Bytes

Contents

require 'spec_helper'

describe Resource::Serialization::Float do
  it "converts to float" do
    subject.class.serialize('1200.49').should == 1200.49
  end

  context "when an invalid value is serialized" do
    it "raises an error" do
      expect {subject.class.serialize("not a float")}.to raise_error
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
transcriber-0.0.26 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.25 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.24 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.23 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.22 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.21 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.20 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.19 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.18 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.17 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.16 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.15 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.14 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.13 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.12 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.11 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.10 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.9 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.8 spec/unit/resource/serialization/float_spec.rb
transcriber-0.0.7 spec/unit/resource/serialization/float_spec.rb