summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_builder.rb')
-rw-r--r--test/rubygems/test_gem_builder.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_builder.rb b/test/rubygems/test_gem_builder.rb
index f95472f..5895b5f 100644
--- a/test/rubygems/test_gem_builder.rb
+++ b/test/rubygems/test_gem_builder.rb
@@ -6,6 +6,7 @@
require 'rubygems/test_case'
require 'rubygems/builder'
+require 'rubygems/package'
class TestGemBuilder < Gem::TestCase
@@ -29,5 +30,21 @@ class TestGemBuilder < Gem::TestCase
end
end
-end
+ def test_build_specification_result
+ util_make_gems
+
+ spec = build_gem_and_yield_spec @a1
+
+ assert_operator @a1, :eql?, spec
+ end
+ def build_gem_and_yield_spec(spec)
+ builder = Gem::Builder.new spec
+
+ spec = Dir.chdir @tempdir do
+ FileUtils.mkdir 'lib'
+ File.open('lib/code.rb', 'w') { |f| f << "something" }
+ Gem::Package.open(File.open(builder.build, 'rb')) { |x| x.metadata }
+ end
+ end
+end