Re: [rspec-users] Nested attributes in fixtures

2010-10-29 Thread Mack T.
By "fixtures outside Rspec", I was referring to files in our db/fixtures directory, which I assumed were fixtures. On further investigation, I found these files are actually being used by some custom 'seeding' code a coworker of mine wrote. The seeding is reading the fixtures and creating AR

[rspec-users] Rails Model Test

2010-10-29 Thread Matthew Smith
Given this model: class Organization < ActiveRecord::Base has_many :users validates :name, :presence => true validates :subdomain, :presence => true validate :has_at_least_one_user private def has_at_least_one_user errors.add(:users, "Must have at least one user.") unless use

Re: [rspec-users] Nested attributes in fixtures

2010-10-29 Thread David Chelimsky
On Oct 29, 2010, at 2:41 PM, Mack T. wrote: > By "fixtures outside Rspec", I was referring to files in our db/fixtures > directory, which I assumed were fixtures. On further investigation, I > found these files are actually being used by some custom 'seeding' code > a coworker of mine wrote.