Re: undefined method `add_assertion' for nil:NilClass

I found my problem.

I added following two lines to my code in my include section, which is
the begin of my main program:

require 'test/unit/assertions'
include Test::Unit::Assertions

This solved all my assert problems in my code.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs