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:
parent
c1afbd39e1
commit
c36abbfd43
3 changed files with 41 additions and 2 deletions
30
test/testunit/test_rake_integration.rb
Normal file
30
test/testunit/test_rake_integration.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue