Methods

Class Index [+]

Quicksearch

Mocha::Integration::MiniTest::Version142To172

Public Class Methods

included(mod) click to toggle source
    # File lib/mocha/integration/mini_test/version_142_to_172.rb, line 11
11:         def self.included(mod)
12:           $stderr.puts "Monkey patching MiniTest >= v1.4.2 and <= v1.7.2" if $mocha_options['debug']
13:         end

Public Instance Methods

run(runner) click to toggle source
    # File lib/mocha/integration/mini_test/version_142_to_172.rb, line 14
14:         def run runner
15:           trap 'INFO' do
16:             warn '%s#%s %.2fs' % [self.class, self.__name__,
17:               (Time.now - runner.start_time)]
18:             runner.status $stderr
19:           end if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
20: 
21:           assertion_counter = AssertionCounter.new(self)
22:           result = '.'
23:           begin
24:             begin
25:               @passed = nil
26:               self.setup
27:               self.__send__ self.__name__
28:               mocha_verify(assertion_counter)
29:               @passed = true
30:             rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
31:               raise
32:             rescue Exception => e
33:               @passed = false
34:               result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
35:             ensure
36:               begin
37:                 self.teardown
38:               rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
39:                 raise
40:               rescue Exception => e
41:                 result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
42:               end
43:               trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
44:             end
45:           ensure
46:             mocha_teardown
47:           end
48:           result
49:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.