title: Factory Girl to_json issues
body: <p>When I call to_json on my Factory Girl object, I get a nil.[] error.</p>
  
  <p>I'm using DataMapper on Rails 3, and when I call to_json on a real DataMapper object, it works just fine. Any idea why the Factory Girl object is failing?</p>
  
  <pre><code>Factory.define :something do |b|
    b.date_foo { 3.days.ago - 4.hours }
    b.date_bar { 3.days.ago - 4.hours }
    b.somestring '11'
    b.anotherstring 'ASTRINGYAY'
    b.thirdstring 'STRINGG'
    b.fourthstring 'STRING'
    b.otherstring 'thestring'
    b.longerstring 'The string that is longer'
    b.somenumber 3
    b.someothernumber 2
    b.an_id 5593
    b.a_version '1.2.2.2'
    b.a_string '1.2.2.2'
    b.something '1.2.2.2'
    b.code 'SOME CODE'
    b.other_code 'API'
    b.something_id 49
    b.something_version 'OMG'
    b.otherthing 'N/A'
    b.lastthing 'A'
  end
  </code></pre>
  
  <p>Also, I discovered the following:</p>
  
  <p><code>factory_girl_object.to_json</code> works fine.</p>
  
  <p><code>[factory_girl_object].to_json</code> fails.</p>
  
  <p>DataMapper apparently uses DataMapper::Collection objects instead of arrays, which handle to_json a bit different for it's contents than arrays do. I can't seem to figure out how to create a DataMapper::Collection object to hold my Factory_Girl objects, however.</p>
  
  <p>Thoughts?</p>