On Sep 1, 2:12=A0pm, Ryan Davis <ryand-r... / zenspider.com> wrote:
> On Sep 1, 2010, at 12:47 , Daniel Berger wrote:
>
> > class Test::Unit::TestCase
> > =A0def assert_nil_or_false(condition)
> > =A0 =A0assert_nil(condition) && assert_false(condition)
> > =A0end
> > end
>
> uhhh... you're fired?

Hah, that's what I get for not actually trying my own code out first.

module Test::Unit::Assertions
  def assert_nil_or_false(object, message =3D nil)
    message =3D build_message(message, '<?> is not false or nil.',
object)
    assert_block(message) do
      object.nil? || object =3D=3D false
    end
  end
end

Regards,

Dan