Michael Fellinger wrote:
> class AssertionError < StandardError
> end
> 
> def assert a, b
>   raise AssertionError, "#{a.inspect} != #{b.inspect}" unless a == b
> end
> 
> assert 1, 1
> assert 1, 2
> 
> 

I like this idea, but I would make it more general (so you could use it 
for more than equality tests):

class AssertionError < StandardError
end

def assert(message=nil, &block)
   unless(block.call)
     raise AssertionError, (message || "Assertion failed")
   end
end

Then you can do:
 >> assert {3==3}
=> nil
 >> assert("This test will fail") {false}
AssertionError: This test will fail
         from (irb):24:in `assert'
         from (irb):29
 >> assert { 3>=1 }
=> nil

And AssertionError will cause an exit (which is desirable behavior), 
unless it is caught.

Dan