mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
c36abbfd43
* 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
30 lines
661 B
Ruby
30 lines
661 B
Ruby
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
|