Skip to content

Instantly share code, notes, and snippets.

View seanbehan's full-sized avatar

Sean Behan seanbehan

View GitHub Profile
@defunkt
defunkt / mini.rb
Created February 18, 2010 13:29
test/spec/mini 5 - nested contexts, stacked setups
##
# test/spec/mini 5
# http://gist.github.com/307649
# chris@ozmm.org
#
def context(*args, &block)
return super unless (name = args.first) && block
require 'test/unit'
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do
def self.test(name, &block)