Sha256: be8099281cf6c22023069fc526fc95bf69ee1e25cba517edffe42ec7520cf7d6

Contents?: true

Size: 339 Bytes

Versions: 25

Compression:

Stored size: 339 Bytes

Contents

require 'spec_helper'

describe Resource::Serialization::Date do
  it "converts to date" do
    subject.class.serialize('2011-07-01').should == Date.new(2011, 07, 01)
  end

  context "when an invalid value is serialized" do
    it "raises an error" do
      expect {subject.class.serialize("not a date")}.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/date_spec.rb
transcriber-0.0.25 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.24 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.23 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.22 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.21 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.20 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.19 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.18 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.17 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.16 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.15 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.14 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.13 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.12 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.11 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.10 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.9 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.8 spec/unit/resource/serialization/date_spec.rb
transcriber-0.0.7 spec/unit/resource/serialization/date_spec.rb