title: How to test a rails model that accepts nested attributes with Cucumber
body: <p>How do you test a model Topic that accepts nested attributes for an Image?</p>
  
  <pre><code>Given /^I have topics titled (.+)$/ do |titles|
      path ="#{RAILS_ROOT}/features/upload-files/" 
      image = File.new(path + "image.jpg")
      titles.split(', ').each do |title|
          Topic.create!(:title =&gt; title, :image =&gt; File.new(image) ) # this doesn't work!
      end
  end
  </code></pre>