Sha256: df0d9e817f9365a3a7bbf06d6aa558f9e1885f16c7f7cb54ba38c4a9b822276e

Contents?: true

Size: 715 Bytes

Versions: 9

Compression:

Stored size: 715 Bytes

Contents

module MiniTestReportersTest
  module Fixtures
    class TestCaseFixture
      attr_writer :_assertions
      
      def self.test_methods
        public_instance_methods(true).grep(/^test/)
      end
      
      def initialize(test)
        @test = test
      end
      
      def run(runner)
        send(@test)
        '.'
      rescue MiniTest::Assertion, RuntimeError => e
        runner.puke(self, @test, e)
      end
      
      def skip
        raise MiniTest::Skip.new
      end
      
      def flunk
        raise MiniTest::Assertion.new
      end
      
      def assert(value)
        self._assertions += 1
      end
      
      def _assertions
        @_assertions ||= 0
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
minitest-reporters-0.9.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.8.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.7.1 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.7.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.6.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.5.1 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.5.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.4.0 test/support/fixtures/test_case_fixture.rb
minitest-reporters-0.3.0 test/support/fixtures/test_case_fixture.rb