Skip to content

Instantly share code, notes, and snippets.

@floehopper
Created October 15, 2009 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floehopper/210776 to your computer and use it in GitHub Desktop.
Save floehopper/210776 to your computer and use it in GitHub Desktop.
require 'bacon'
require 'mocha_standalone'
module Bacon
class AssertionCounter
def increment
Counter[:requirements] += 1
end
end
class Context
include Mocha::API
def initialize(name, &block)
assertion_counter = AssertionCounter.new
@name = name
@before, @after = [
[lambda { mocha_setup }],
[lambda { mocha_verify(assertion_counter) ; mocha_teardown }]
]
@block = block
end
def xit(desc, &bk)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment