<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -155,29 +155,32 @@ describe Comma, 'to_comma data/headers object extensions' do
   describe 'with block' do
     before do
       class Foo
-        attr_accessor :content, :time
+        attr_accessor :content, :created_at, :updated_at
         comma do
-          time('Date') {|i| i.strftime(&quot;%Y/%m/%d&quot;) }
-          content {|i| i ? i : '---' }
+          time_to_s = lambda { |i| i &amp;&amp; i.to_s(:db) }
+          content
           content('Truncated Content') {|i| i &amp;&amp; i.length &gt; 10 ? i[0..10] : '---' }
+          created_at &amp;time_to_s
+          updated_at &amp;time_to_s
         end
-      
-        def initialize(content)
+        
+        def initialize(content, created_at = Time.now, updated_at = Time.now)
           @content = content
-          @time = Time.mktime(2009, 9, 8, 12, 44, 40)
+          @created_at = created_at
+          @updated_at = updated_at
         end
       end
-    
-      @foo = Foo.new('content ' * 5)
-      @bar = Foo.new nil
+      
+      @time = Time.now
+      @content = 'content ' * 5
+      @foo = Foo.new @content, @time, @time
     end
     
     it 'should return yielded values by block' do
-      header, foo, bar = [@foo, @bar].to_comma.split(&quot;\n&quot;)
-      foo.should == &quot;2009/09/08,content content content content content ,content con&quot;
-      bar.should == &quot;2009/09/08,---,---&quot;
+      header, foo = Array(@foo).to_comma.split(&quot;\n&quot;)
+      foo.should == [@content, @content[0..10], @time.to_s(:db), @time.to_s(:db)].join(',')
     end
-
+    
   end
   
   describe 'on an object with no comma declaration' do</diff>
      <filename>spec/comma/comma_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>66f3a877c0def5e5597663971e75fb833795ba95</id>
    </parent>
  </parents>
  <author>
    <name>swdyh</name>
    <email>youhei@gmail.com</email>
  </author>
  <url>http://github.com/crafterm/comma/commit/dd99261f589ad8831cc7e17d1469adc4267d81dc</url>
  <id>dd99261f589ad8831cc7e17d1469adc4267d81dc</id>
  <committed-date>2009-09-08T00:33:21-07:00</committed-date>
  <authored-date>2009-09-08T00:33:21-07:00</authored-date>
  <message>fixed spec when block given.</message>
  <tree>dfdd9ea0a3518785881b87ef16ac15a6abdc49d5</tree>
  <committer>
    <name>swdyh</name>
    <email>youhei@gmail.com</email>
  </committer>
</commit>
