2011-01-18 19:08:49 -05:00
|
|
|
######################################################################
|
|
|
|
# This file is imported from the rubygems project.
|
|
|
|
# DO NOT make modifications in this repo. They _will_ be reverted!
|
|
|
|
# File a patch instead and assign it to Ryan Davis or Eric Hodel.
|
|
|
|
######################################################################
|
|
|
|
|
2011-01-28 18:46:47 -05:00
|
|
|
require 'rubygems/test_case'
|
2007-11-10 02:48:56 -05:00
|
|
|
require 'rubygems/builder'
|
|
|
|
|
2011-01-28 18:46:47 -05:00
|
|
|
class TestGemBuilder < Gem::TestCase
|
2007-11-10 02:48:56 -05:00
|
|
|
|
|
|
|
def test_build
|
2011-03-07 03:44:45 -05:00
|
|
|
builder = Gem::Builder.new quick_spec('a')
|
2007-11-10 02:48:56 -05:00
|
|
|
|
|
|
|
use_ui @ui do
|
|
|
|
Dir.chdir @tempdir do
|
|
|
|
builder.build
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
assert_match %r|Successfully built RubyGem\n Name: a|, @ui.output
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_build_validates
|
|
|
|
builder = Gem::Builder.new Gem::Specification.new
|
|
|
|
|
2008-09-25 06:13:50 -04:00
|
|
|
assert_raises Gem::InvalidSpecificationException do
|
2007-11-10 02:48:56 -05:00
|
|
|
builder.build
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|