floehopper (owner)

Revisions

gist: 210776 Download_button fork
public
Public Clone URL: git://gist.github.com/210776.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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