[rspec-users] Nested attributes in fixtures

David Chelimsky dchelimsky at gmail.com
Thu Oct 28 06:35:42 EDT 2010


On Wed, Oct 27, 2010 at 6:30 PM, Mack T. <lists at ruby-forum.com> wrote:
> I appreciate the quick response!  Sorry for the delay.  The relevant
> code is attached.  Our model's name is Scale, which has_many
> ScaleElements.
>
> We're loading fixtures in specs with config.fixture_path =
> "#{::Rails.root}/spec/fixtures"
>
> Nested attributes don't work (although they do outside of Rspec in
> Rails), and we're currently solving the problem by creating a
> scale_elements.yml fixture and not nesting attributes.
>
> rspec version: 2.0.1
> rails version: 3.0.0
>
> Attachments:
> http://www.ruby-forum.com/attachment/5251/code.txt

I haven't used fixtures myself in a couple of years, and never used
nested attributes. Does anyone else on the list have any advice to
offer about this?


More information about the rspec-users mailing list