On 23 December 2010 03:17, daze <[email protected]> wrote:
> Here's my issue: running ruby -I test test/unit/something_test.rb for
> each of my unit tests works perfectly.
> However, running rake test:units brings errors in all of them - some
> object becomes nil for some reason.
>
> Why might this be happening?
>
> Specifics: the object that is successfully not nil when I run the unit
> tests one-by-one but becomes nil when I do rake test:units is defined
> like this...
>
> klass = self.name.gsub(/Test$/, "").constantize
> instance = klass.first

You could use ruby-debug to break into the test at the point of
failure and inspect the data and see what is going on.  If you have
not used ruby-debug have a look at the Rails Guide on debugging to see
how.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to