PageRenderTime 171ms CodeModel.GetById 163ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/gems/1.8/gems/rake-0.9.2/test/helper.rb

http://github.com/agross/netopenspace
Ruby | 44 lines | 32 code | 11 blank | 1 comment | 1 complexity | dc0986b52ede22a1f094202303affa30 MD5 | raw file
 1require 'rubygems'
 2require 'minitest/unit'
 3require 'flexmock/test_unit_integration'
 4require 'minitest/autorun'
 5require 'rake'
 6require File.expand_path('../file_creation', __FILE__)
 7require File.expand_path('../in_environment', __FILE__)
 8
 9class Rake::TestCase < MiniTest::Unit::TestCase
10  include FlexMock::ArgumentTypes
11  include FlexMock::MockContainer
12
13  include InEnvironment
14  include FileCreation
15
16  include Rake::DSL
17
18  class TaskManager
19    include Rake::TaskManager
20  end
21
22  def setup
23    @orig_PWD = Dir.pwd
24  end
25
26  def teardown
27    flexmock_teardown
28
29    Dir.chdir @orig_PWD
30  end
31
32  def ignore_deprecations
33    Rake.application.options.ignore_deprecate = true
34    yield
35  ensure
36    Rake.application.options.ignore_deprecate = false
37  end
38
39end
40
41# workarounds for 1.8
42$" << 'test/helper.rb'
43Test::Unit.run = true if Test::Unit.respond_to? :run=
44