mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/rake*: Remove dependencies on flexmock and session gems.
[Ruby 1.9 - Bug #4987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12d9be6b72
commit
c93ed570a2
11 changed files with 238 additions and 182 deletions
|
@ -1,15 +1,22 @@
|
|||
require 'rubygems'
|
||||
require 'minitest/unit'
|
||||
require 'flexmock/test_unit_integration'
|
||||
|
||||
begin
|
||||
gem 'minitest'
|
||||
rescue Gem::LoadError
|
||||
end
|
||||
|
||||
require 'minitest/autorun'
|
||||
require 'rake'
|
||||
require 'tmpdir'
|
||||
require File.expand_path('../file_creation', __FILE__)
|
||||
|
||||
class Rake::TestCase < MiniTest::Unit::TestCase
|
||||
include FlexMock::ArgumentTypes
|
||||
include FlexMock::MockContainer
|
||||
begin
|
||||
require 'test/ruby/envutil'
|
||||
rescue LoadError
|
||||
# for ruby trunk
|
||||
end
|
||||
|
||||
class Rake::TestCase < MiniTest::Unit::TestCase
|
||||
include FileCreation
|
||||
|
||||
include Rake::DSL
|
||||
|
@ -18,6 +25,8 @@ class Rake::TestCase < MiniTest::Unit::TestCase
|
|||
include Rake::TaskManager
|
||||
end
|
||||
|
||||
RUBY = defined?(EnvUtil) ? EnvUtil.rubybin : Gem.ruby
|
||||
|
||||
def setup
|
||||
ARGV.clear
|
||||
|
||||
|
@ -43,11 +52,10 @@ class Rake::TestCase < MiniTest::Unit::TestCase
|
|||
|
||||
Rake.application = Rake::Application.new
|
||||
Rake::TaskManager.record_task_metadata = true
|
||||
RakeFileUtils.verbose_flag = false
|
||||
end
|
||||
|
||||
def teardown
|
||||
flexmock_teardown
|
||||
|
||||
Dir.chdir @orig_PWD
|
||||
FileUtils.rm_rf @tempdir
|
||||
|
||||
|
@ -434,17 +442,6 @@ end
|
|||
end
|
||||
end
|
||||
|
||||
def rakefile_statusreturn
|
||||
rakefile <<-STATUSRETURN
|
||||
task :exit5 do
|
||||
exit(5)
|
||||
end
|
||||
|
||||
task :normal do
|
||||
end
|
||||
STATUSRETURN
|
||||
end
|
||||
|
||||
def rakefile_unittest
|
||||
rakefile '# Empty Rakefile for Unit Test'
|
||||
|
||||
|
@ -494,7 +491,3 @@ end
|
|||
|
||||
end
|
||||
|
||||
# workarounds for 1.8
|
||||
$" << 'test/helper.rb'
|
||||
Test::Unit.run = true if Test::Unit.respond_to? :run=
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue