2007-11-10 02:48:56 -05:00
|
|
|
#--
|
|
|
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
|
|
# All rights reserved.
|
|
|
|
# See LICENSE.txt for permissions.
|
|
|
|
#++
|
|
|
|
|
|
|
|
require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
|
|
|
|
require 'rubygems/builder'
|
|
|
|
|
|
|
|
class TestGemBuilder < RubyGemTestCase
|
|
|
|
|
|
|
|
def test_build
|
|
|
|
builder = Gem::Builder.new quick_gem('a')
|
|
|
|
|
|
|
|
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
|
|
|
|
|