spec/saxomattic_spec.rb in saxomattic-0.0.2 vs spec/saxomattic_spec.rb in saxomattic-0.0.3
- old
+ new
@@ -28,12 +28,12 @@
attribute :baz
attribute :foo, :type => Integer
attribute :iso_8701, :type => Date
attribute :date, :type => Date
attribute :datetime, :type => DateTime
- attribute :embedded, :elements => true, :class => SaxTesterEmbedded
- attribute :child, :as => :children, :elements => true, :class => SaxTesterChild
+ attribute :embedded, :elements => true, :class => SaxTesterEmbedded, :default => []
+ attribute :child, :as => :children, :elements => true, :class => SaxTesterChild, :default => []
attribute :CAPITALIZATION, :as => :capitalization
end
describe ::Saxomattic do
@@ -45,10 +45,10 @@
let(:xml) {
<<-XML
<test>
<baz>#{baz}</baz>
<iso_8701>2013-01-13</iso_8701>
- <datetime>#{DateTime.current}</datetime>
+ <datetime>#{DateTime.now}</datetime>
<embedded>
<foo>2</foo>
<embed>#{embedded_message}</embed>
<embedception type="#{embedception_type}">#{embedception_value}</embedception>
</embedded>