.

Test::UnitWrongNotes

.

assert_block { x }assert { x }

.

assert(x)assert { x }

.

assert_equal x, yassert { x == y }Formatters for String, Array

.

assert_raise LoadError { x }assert { rescuing { x } === LoadError }I slightly prefer how this reads: assert{ rescuing{x}.is_a?(LoadError) }

.

assert_raise { x }assert { rescuing { x } }
assert { rescuing { x } != nil }

.

assert_raise LoadError.new("why") { x }assert { rescuing { x } == LoadError.new("why") }

.

assert_raise(RuntimeError, LoadError) { x }assert do
e = rescuing { x }
e === RuntimeError || e === LoadError
end

.

assert_raise_kind_of(LoadError) { x }assert { rescuing { x } === LoadError }

.

assert_instance_of(String, x)assert { x.is_a? String }

.

assert_instance_of([String, Fixnum], x)assert { x.is_a? String or x.is_a? Fixnum}
assert { [String, Fixnum].detect? {|k| x.is_a? k}

.

assert_nil xassert { x.nil? }

.

assert_kind_ofsee assert_instance_of

.

assert_respond_to x, :to_yassert { x.respond_to? :y }

.

assert_match /regex/, sassert { s =~ /regex/ }

.

assert_same x, yassert { x.equal? y }

.

assert_operator x, :>=, yassert { x >= y }
assert { x.send(:>=, y) }

.

assert_nothing_raised xdeny { rescuing { x } }

.

flunkassert { false }

.

assert_not_same x,ydeny { x.equal? y }

.

assert_not_equal x,ydeny { x == y }

.

assert_not_nildeny { x.nil? }

.

assert_no_match regex, xdeny { x =~ /regex/ }
assert { x !~ /regex/ }

.

assert_throwN/Awe could write a "catching" helper

.

assert_throwsN/AI do assert{ rescuing{foo}.nil? } which could be expressed as deny{ rescuing{foo} }

.

assert_nothing_thrownN/A

.

assert_in_delta f, g, deltaf.close_to?(g, delta)

.

assert_send [o, m, arg1, arg2]assert { o.send(m, arg1, arg2) }

.

assert_boolean xassert { [true, false].include? x }

.

assert_true xassert { x == true }or assert{ x } (though, I prefer yours)

.

assert_false xassert { x == false }or deny{ x }

.

assert_compare x, ">=", yassert { x >= y }

.

assert_fail_assertion { x }assert { rescuing { x } === AssertionFailedError }

.

assert_raise_message m, { x }assert { rescuing { x }.message == m }

.

assert_const_defined Test, :Unitassert { Test.const_defined? :Unit }

.

assert_not_const_defined Test, :Unitdeny { Test.const_defined? :Unit }

.

assert_predicate o, :empty?assert { o.empty? }

.

assert_not_predicatedeny { o.empty? }

.

assert_alias_methodN/A

.

assert_path_exist "/foo"assert { File.exist? "/foo" }

.

assert_path_not_exist "/foo"deny { File.exist? "/foo" }