[rspec-users] Nested attributes in fixtures

Mack T. lists at ruby-forum.com
Wed Oct 27 16:30:31 EDT 2010


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


-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list