diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_package_task.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb index 56d574d9a3..9d87db88ae 100644 --- a/test/rubygems/test_gem_package_task.rb +++ b/test/rubygems/test_gem_package_task.rb @@ -47,6 +47,34 @@ class TestGemPackageTask < Gem::TestCase end end + def test_gem_package_prints_to_stdout_by_default + gem = Gem::Specification.new do |g| + g.name = "pkgr" + g.version = "1.2.3" + + g.authors = %w[author] + g.files = %w[x] + g.summary = 'summary' + end + + pkg = Gem::PackageTask.new(gem) do |p| + p.package_files << "y" + end + + 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 + end + def test_gem_package_with_current_platform RakeFileUtils.verbose_flag = false |