summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_package_task.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_package_task.rb')
-rw-r--r--test/rubygems/test_gem_package_task.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb
index 9d87db88ae..0ce9f08b01 100644
--- a/test/rubygems/test_gem_package_task.rb
+++ b/test/rubygems/test_gem_package_task.rb
@@ -8,8 +8,6 @@ class TestGemPackageTask < Gem::TestCase
def setup
super
- Rake.application = Rake::Application.new
-
@original_rake_fileutils_verbosity = RakeFileUtils.verbose_flag
end
@@ -31,6 +29,8 @@ class TestGemPackageTask < Gem::TestCase
g.summary = 'summary'
end
+ Rake.application = Rake::Application.new
+
pkg = Gem::PackageTask.new(gem) do |p|
p.package_files << "y"
end
@@ -57,22 +57,24 @@ class TestGemPackageTask < Gem::TestCase
g.summary = 'summary'
end
- pkg = Gem::PackageTask.new(gem) do |p|
- p.package_files << "y"
- end
+ _, err = capture_io do
+ Rake.application = Rake::Application.new
- assert_equal %w[x y], pkg.package_files
+ pkg = Gem::PackageTask.new(gem) do |p|
+ p.package_files << "y"
+ end
- Dir.chdir @tempdir do
- FileUtils.touch 'x'
- FileUtils.touch 'y'
+ assert_equal %w[x y], pkg.package_files
+
+ Dir.chdir @tempdir do
+ FileUtils.touch 'x'
+ FileUtils.touch 'y'
- _, err = capture_io do
Rake.application['package'].invoke
end
-
- assert_empty err
end
+
+ assert_empty err
end
def test_gem_package_with_current_platform