Interesting Things
Fixjour blows up on validations for associated models
Two Pivots experienced this problem on separate projects. The general consensus was that generating objects with correct associations can be difficult. FactoryGirl was recommended as a fixture plugin that handles this problem particularly well. It was also suggested that rolling your own object mothers was trivial (fisticuffs ensued).
timeout.rb
Timeout.rb raises an exception to kill child threads; it so happens that this exception can be caught, and possibly swallowed. This is truly a Noid to be avoided at all costs.
- UPDATE: Tests using Paperclip fail to run
When Paperclip cannot find identify in the path, it will raise an error that suggests it has been called with incorrect arguments. This is a bold-faced lie.
One Pivot remarked that these tests should really be mocking Paperclip in the first place, which seems an appropriate response to dishonesty.
Can someone post a failing test or example of Fixjour blowing up on associated models? I’d like to check it out.
December 9, 2009 at 11:48 am
Pat:
Apparently there was some sort of collision on a new_user method that lived somewhere down in Socialitis.
Removing this method fixed everyone’s wagons.
December 10, 2009 at 9:28 am