How to test a rails model that accepts nested attributes with Cucumber -


How do you test a model subject that accepts nested attributes for an image?

  / ^ I have a subject (. +) $ / Do | Title | Path = "# {RAILS_ROOT} / features / upload-file /" image = file. New (Path + "Image .jpg") Titles. (',') .each do | Title | Subject. Create! (: Title = & gt; Title ,: image = & gt; File.new (image)) # This does not work!    

  topic .create! (: Title = & gt; Title: Image_attributes => {: image = & gt; File.new (image)}) # This works!  

Comments