Mark Wilden wrote:
It seems logical that #errors_on would call valid? Otherwise, how would it know?

That intuitively makes sense.

The reason the whole issue is confusing is because of AR's behaviour:

>> User.new.valid?
=> false
>> User.new.errors.to_a
=> []

errors_on(:foo) looks like it'll call errors.on(:foo), which returns nil if valid? isn't called.

Scott


///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to