Module: Mocha::Integration::TestUnit::GemVersion201AndAbove

### Home Classes Methods

### In Files

- lib/mocha/integration/test_unit/gem_version_201_and_above.rb

### Methods

- #run

### Files

- COPYING
- README

### Class/Module Index

Quicksearch

- Mocha
- Mocha::API
- Mocha::AnyInstanceMethod
- Mocha::ArgumentIterator
- Mocha::ArrayMethods
- Mocha::BacktraceFilter
- Mocha::Cardinality
- Mocha::Central
- Mocha::ChangeStateSideEffect
- Mocha::ClassMethod
- Mocha::ClassMethods
- Mocha::Configuration
- Mocha::DateMethods
- Mocha::DefaultName
- Mocha::Deprecation
- Mocha::Expectation
- Mocha::ExpectationError
- Mocha::ExpectationList
- Mocha::HashMethods
- Mocha::ImpersonatingAnyInstanceName
- Mocha::ImpersonatingName
- Mocha::InStateOrderingConstraint
- Mocha::InstanceMethod
- Mocha::Integration
- Mocha::Integration::MiniTest
- Mocha::Integration::MiniTest::AssertionCounter
- Mocha::Integration::MiniTest::Version131AndAbove
- Mocha::Integration::TestUnit
- Mocha::Integration::TestUnit::AssertionCounter
- Mocha::Integration::TestUnit::GemVersion200
- Mocha::Integration::TestUnit::GemVersion201AndAbove
- Mocha::Integration::TestUnit::RubyVersion185AndBelow
- Mocha::Integration::TestUnit::RubyVersion186AndAbove
- Mocha::Logger
- Mocha::MethodMatcher
- Mocha::Mock
- Mocha::Mockery
- Mocha::ModuleMethod
- Mocha::Name
- Mocha::ObjectMethods
- Mocha::ParameterMatchers
- Mocha::ParametersMatcher
- Mocha::PrettyParameters
- Mocha::Sequence
- Mocha::Sequence::InSequenceOrderingConstraint
- Mocha::StateMachine
- Mocha::StringMethods
- Mocha::StubbingError
- Mocha::TimeMethods
- Mocha::UnexpectedInvocation
- MiniTest
- MiniTest::Unit
- MiniTest::Unit::TestCase
- Test
- Test::Unit
- Test::Unit::TestCase
- Array
- Date
- Hash
- Object
- String
- Time

No matching classes.

# Mocha::Integration::TestUnit::GemVersion201AndAbove

### Public Instance Methods

run(result) click to toggle source

    # File lib/mocha/integration/test_unit/gem_version_201_and_above.rb, line 12
    def run(result)
      assertion_counter = AssertionCounter.new(result)
      begin
        @_result = result
        yield(Test::Unit::TestCase::STARTED, name)
        begin
          begin
            run_setup
            run_test
            mocha_verify(assertion_counter)
          rescue Mocha::ExpectationError => e
            add_failure(e.message, e.backtrace)
          rescue Exception
            @interrupted = true
            raise unless handle_exception($!)
          ensure
            begin
              run_teardown
            rescue Exception
              raise unless handle_exception($!)
            end
          end
        ensure
          mocha_teardown
        end
        result.add_run
        yield(Test::Unit::TestCase::FINISHED, name)
      ensure
        @_result = nil
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.