Methods

Class Index [+]

Quicksearch

Mocha::Integration::TestUnit::GemVersion203To220

Public Class Methods

included(mod) click to toggle source
    # File lib/mocha/integration/test_unit/gem_version_203_to_220.rb, line 12
12:         def self.included(mod)
13:           $stderr.puts "Monkey patching Test::Unit gem >= v2.0.3 and <= v2.2.0" if $mocha_options['debug']
14:         end

Public Instance Methods

run(result) click to toggle source
    # File lib/mocha/integration/test_unit/gem_version_203_to_220.rb, line 15
15:         def run(result)
16:           assertion_counter = AssertionCounter.new(result)
17:           begin
18:             @_result = result
19:             yield(Test::Unit::TestCase::STARTED, name)
20:             begin
21:               begin
22:                 run_setup
23:                 run_test
24:                 mocha_verify(assertion_counter)
25:               rescue Mocha::ExpectationError => e
26:                 add_failure(e.message, e.backtrace)
27:               rescue Exception
28:                 @interrupted = true
29:                 raise unless handle_exception($!)
30:               ensure
31:                 begin
32:                   run_teardown
33:                 rescue Exception
34:                   raise unless handle_exception($!)
35:                 end
36:               end
37:             ensure
38:               mocha_teardown
39:             end
40:             result.add_run
41:             yield(Test::Unit::TestCase::FINISHED, name)
42:           ensure
43:             # @_result = nil # For test-spec's after_all :<
44:           end
45:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.