Sha256: c669d0ea3828646b9ed929eeee120719b28d55c2038d7b2a83fdb4de5dedd09c

Contents?: true

Size: 435 Bytes

Versions: 21

Compression:

Stored size: 435 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

require 'activesupport'

describe Hash do
  describe "#from_xml" do
    it "should be able to convert xml with datetimes" do
      xml =<<EOL
<?xml version="1.0" encoding="UTF-8"?>
<created-at type="datetime">2008-12-01T20:00:00-05:00</created-at>
EOL
      hsh = Hash.from_xml(xml)
      hsh["created_at"].should == Time.parse("December 01st, 2008 20:00:00")
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
alexvollmer-httparty-0.2.6 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.1 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.10 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.2 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.3 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.4 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.5 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.6 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.7 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.8 spec/as_buggery_spec.rb
jnunemaker-httparty-0.2.9 spec/as_buggery_spec.rb
httparty-0.2.10 spec/as_buggery_spec.rb
httparty-0.2.1 spec/as_buggery_spec.rb
httparty-0.2.3 spec/as_buggery_spec.rb
httparty-0.2.6 spec/as_buggery_spec.rb
httparty-0.2.7 spec/as_buggery_spec.rb
httparty-0.2.9 spec/as_buggery_spec.rb
httparty-0.2.2 spec/as_buggery_spec.rb
httparty-0.2.5 spec/as_buggery_spec.rb
httparty-0.2.4 spec/as_buggery_spec.rb