Rajan AgaskarRajan Agaskar
Standup 12/9/2009
edit Posted by Rajan Agaskar on Wednesday December 09, 2009 at 09:18AM

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.

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.

Comments

  1. Pat Nakajima Pat Nakajima on December 09, 2009 at 11:48AM

    Can someone post a failing test or example of Fixjour blowing up on associated models? I'd like to check it out.

  2. Rajan Agaskar Rajan Agaskar on December 10, 2009 at 09:28AM

    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.