Sha256: 3112b7f8385fa63a5d51e71d3534b6f66123968a492fc485e78db1a50ee6763e

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

require 'mocha/monkey_patching/mini_test/assertion_counter'

module Mocha

  module MonkeyPatching

    module MiniTest

      module Version13
        def self.included(mod)
          $stderr.puts "Monkey patching MiniTest v1.3" 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::MonkeyPatching::MiniTest.translate(e))
            ensure
              begin
                self.teardown
              rescue Exception => e
                result = runner.puke(self.class, self.name, Mocha::MonkeyPatching::MiniTest.translate(e))
              end
            end
          ensure
            mocha_teardown
          end
          result
        end
      end

    end

  end

end

Version data entries

10 entries across 8 versions & 3 rubygems

Version Path
challah-rolls-0.2.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-rolls-0.1.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-0.8.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-0.7.1 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-0.7.0 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-0.7.0.pre2 vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
challah-0.7.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/monkey_patching/mini_test/version_13.rb
mocha-0.12.2 lib/mocha/monkey_patching/mini_test/version_13.rb