0
モデルをテストする方法イメージのネストされた属性を受け入れるトピック?キュウリでネストされた属性を受け入れるレールモデルをテストする方法
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 => title, :image => File.new(image)) # this doesn't work!
end
end