Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created September 30, 2008 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonroelofs/13965 to your computer and use it in GitHub Desktop.
Save jasonroelofs/13965 to your computer and use it in GitHub Desktop.
require 'test/unit'
class ShouldTest < Test::Unit::TestCase
def self.should(behave, &block)
mname = "test_should_#{behave}"
if block
define_method mname, &block
else
define_method mname do
flunk "#{self.class.name.sub(/Test$/,'')} should #{behave}"
end
end
end
should "give me a true!" do
assert true
end
should "fail badly and show in stdout" do
assert false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment