Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created August 27, 2008 00:16
Show Gist options
  • Save jbarnette/7384 to your computer and use it in GitHub Desktop.
Save jbarnette/7384 to your computer and use it in GitHub Desktop.
require "test/unit"
module Kernel
def describe(description, &block)
Class.new(Unitard::TestCase, &block)
end
end
module Unitard
class TestCase < Test::Unit::TestCase
def run(*args)
return if @method_name.to_s == "default_test"
super
end
def self.it(description, &block)
define_method("test: #{description}", &block)
end
end
end
describe "a pointless test" do
it "makes sure true is true" do
assert(false)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment