Created
August 4, 2012 12:44
-
-
Save wojtekmach/3257424 to your computer and use it in GitHub Desktop.
minitest/spec + context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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