Skip to content

Instantly share code, notes, and snippets.

@wojtekmach
Created August 4, 2012 12:44
Show Gist options
  • Select an option

  • Save wojtekmach/3257424 to your computer and use it in GitHub Desktop.

Select an option

Save wojtekmach/3257424 to your computer and use it in GitHub Desktop.
minitest/spec + context
class MiniTest::Spec
def self.context(desc, &block)
stack = MiniTest::Spec.describe_stack
name = [stack.last, desc].compact.join('::')
Class.new self do
@name = name
class_eval &block
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment