Sha256: 6b1588e9c809bc01a78e44933c417eac269795b4e49b53839d9622f3704ff5bd

Contents?: true

Size: 1.11 KB

Versions: 23

Compression:

Stored size: 1.11 KB

Contents

require 'mocha/integration/mini_test/assertion_counter'
require 'mocha/expectation_error'

module Mocha

  module Integration

    module MiniTest

      module Version140
        def self.included(mod)
          $stderr.puts "Monkey patching MiniTest v1.4.0" if $mocha_options['debug']
        end
        def run runner
          assertion_counter = AssertionCounter.new(self)
          result = '.'
          begin
            begin
              @passed = nil
              self.setup
              self.__send__ self.__name__
              mocha_verify(assertion_counter)
              @passed = true
            rescue Exception => e
              @passed = false
              result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
            ensure
              begin
                self.teardown
              rescue Exception => e
                result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
              end
            end
          ensure
            mocha_teardown
          end
          result
        end
      end

    end

  end

end

Version data entries

23 entries across 22 versions & 3 rubygems

Version Path
mocha-0.12.10 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.9 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.8 lib/mocha/integration/mini_test/version_140.rb
challah-rolls-0.2.0 vendor/bundle/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_140.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_140.rb
challah-0.8.3 vendor/bundle/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.7 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.6 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.5 lib/mocha/integration/mini_test/version_140.rb
challah-0.8.1 vendor/bundle/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.4 lib/mocha/integration/mini_test/version_140.rb
challah-rolls-0.1.0 vendor/bundle/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.3 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.1 lib/mocha/integration/mini_test/version_140.rb
mocha-0.12.0 lib/mocha/integration/mini_test/version_140.rb
challah-0.6.2 vendor/bundle/gems/mocha-0.11.4/lib/mocha/integration/mini_test/version_140.rb
challah-0.6.1 vendor/bundle/gems/mocha-0.11.4/lib/mocha/integration/mini_test/version_140.rb
challah-0.6.0 vendor/bundle/gems/mocha-0.11.4/lib/mocha/integration/mini_test/version_140.rb
mocha-0.11.4 lib/mocha/integration/mini_test/version_140.rb
mocha-0.11.3 lib/mocha/integration/mini_test/version_140.rb