Sha256: 67b3bfe8ce479588b6493444ee9b4a6a1200cd551ec1d5cfb3ffeebc9f309c68

Contents?: true

Size: 1012 Bytes

Versions: 24

Compression:

Stored size: 1012 Bytes

Contents

# Why: http://groups.google.com/group/cukes/browse_thread/thread/5682d41436e235d7
begin
  require 'minitest/unit'
  # Don't attempt to monkeypatch if the require succeeded but didn't
  # define the actual module.
  #
  # https://github.com/cucumber/cucumber/pull/93
  # http://youtrack.jetbrains.net/issue/TW-17414
  if defined?(MiniTest::Unit)
    class MiniTest::Unit
      class << self
        @@installed_at_exit = true
      end

      def run(*)
        0
      end
    end
  end
rescue LoadError => ignore
end

# Do the same for Test::Unit
begin
  require 'test/unit'
  # Don't attempt to monkeypatch if the require succeeded but didn't
  # define the actual module.
  #
  # https://github.com/cucumber/cucumber/pull/93
  # http://youtrack.jetbrains.net/issue/TW-17414
  if defined?(Test::Unit)
    module Test::Unit
      def self.run?
        true
      end
    end
  end

  # if defined?(Test::Unit::AutoRunner)
  #   Test::Unit::AutoRunner.need_auto_run = false
  # end
rescue LoadError => ignore
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
satchel-0.0.2 spec/spec_patch.rb
satchel-0.0.1 spec/spec_patch.rb
curate-0.3.2 spec/spec_patch.rb
curate-0.3.1 spec/spec_patch.rb