On Thu, Feb 24, 2011 at 2:07 PM, Tom Milewski <tmilew...@gmail.com> wrote:
> Thanks for the replies. > > Here's the error I'm seeing when running all specs (.build > and .create): > > Agent while creating should ensure that name is present > Failure/Error: Factory(:public_agent, :name => nil).should > have(1).error_on(:name) > expected 1 error on :name, got 0 > # ./spec/models/agent_spec.rb:35:in `block (3 levels) in <top > (required)>' > > Here's what I'm seeing when running model specs with .create: > > Agent while creating should ensure that name is present > Failure/Error: Factory(:public_agent, :name => nil).should > have(1).error_on(:name) > ActiveRecord::RecordInvalid: > Validation failed: Name can't be blank > # ./spec/models/agent_spec.rb:35:in `block (3 levels) in <top > (required)>' > > Everything passes when running model specs with .build. > Have you tried with Agent.new and/or Agent.create? Maybe factory_girl is doing something strange. Also, what versions of rails, rspec-rails, rspec and factory_girl are you using? Craig
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users