1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]

* test/testunit/test_rake_integration.rb: adding an integration test
  with the rake loader to prevent regressions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2011-02-18 21:39:09 +00:00
parent c1afbd39e1
commit c36abbfd43
3 changed files with 41 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Sat Feb 19 06:36:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]
* test/testunit/test_rake_integration.rb: adding an integration test
with the rake loader to prevent regressions.
Fri Feb 18 19:31:31 2011 Shugo Maeda <shugo@ruby-lang.org>
* lib/fileutils.rb (FileUtils::remove_entry_secure): there is a

View file

@ -186,8 +186,6 @@ module Test
end
class Runner < MiniTest::Unit
include Test::Unit::Options
include Test::Unit::RequireFiles
include Test::Unit::GlobOption
include Test::Unit::LoadPathOption
include Test::Unit::GCStressOption
@ -225,6 +223,10 @@ module Test
end
class AutoRunner
class Runner < Test::Unit::Runner
include Test::Unit::RequireFiles
end
attr_accessor :to_run, :options
def initialize(force_standalone = false, default_dir = nil, argv = ARGV)

View file

@ -0,0 +1,30 @@
require 'minitest/autorun'
require 'tmpdir'
require_relative '../ruby/envutil'
class RakeIntegration < MiniTest::Unit::TestCase
include Test::Unit::Assertions
RAKE_LOADER = File.expand_path(
File.join(
File.dirname(__FILE__),
'..',
'..',
'lib',
'rake',
'rake_test_loader.rb'))
def test_with_rake_runner
Dir.mktmpdir do |dir|
filename = File.join dir, 'testing.rb'
File.open(filename, 'wb') do |f|
f.write <<-eotest
require 'test/unit'
raise 'loaded twice' if defined?(FooTest)
class FooTest; end
eotest
end
assert_ruby_status(%w{ -w } + [RAKE_LOADER, filename])
end
end
end