Created
July 29, 2008 06:53
-
-
Save rsanheim/3034 to your computer and use it in GitHub Desktop.
This file contains 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
# This gets mocha and bacon playing together, but there needs to be a hack in mocha as well | |
# See the open issue here: | |
# http://groups.google.com/group/mocha-developer/browse_thread/thread/2ac239561ef07b23 | |
require 'bacon' | |
require "mocha/standalone" | |
require "mocha/object" | |
class Bacon::Context | |
include Mocha::Standalone | |
def initialize(name, &block) | |
@name = name | |
@before, @after = [lambda { mocha_setup }], [lambda { mocha_verify }, lambda { mocha_teardown }] | |
# return unless name =~ RestrictContext | |
Bacon.handle_specification(name) { instance_eval(&block) } | |
end | |
end | |
Bacon.summary_on_exit # if you want test unit style output on exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment