diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-13 19:58:57 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-13 19:58:57 +0000 |
commit | 1daa0b113d853bfa57b776cc569939b61ca14292 (patch) | |
tree | f8c4acb08a551820299dff2b13966d6ac38d31e4 /test/rubygems/test_gem_ext_builder.rb | |
parent | 85995e88d49c442b5b113c2676456133e79f5c02 (diff) | |
download | ruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz |
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems
Restored concurrent requires
Fixed installing gems with extensions with --install-dir
Fixed `gem fetch -v` to install the latest version
Fixed installing gems with "./" in their files entries
* test/rubygems/test_gem_package.rb: Tests for the above.
* NEWS: Updated for RubyGems 2.1.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_ext_builder.rb')
-rw-r--r-- | test/rubygems/test_gem_ext_builder.rb | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index 8383040f88..6e34ee7e46 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -1,6 +1,5 @@ require 'rubygems/test_case' require 'rubygems/ext' -require 'rubygems/installer' class TestGemExtBuilder < Gem::TestCase @@ -14,10 +13,6 @@ class TestGemExtBuilder < Gem::TestCase FileUtils.mkdir_p @dest_path @orig_DESTDIR = ENV['DESTDIR'] - - @spec = quick_spec 'a' - - @builder = Gem::Ext::Builder.new @spec, '' end def teardown @@ -61,93 +56,5 @@ install: end end - def test_build_extensions_none - use_ui @ui do - @builder.build_extensions - end - - assert_equal '', @ui.output - assert_equal '', @ui.error - - refute File.exist?('gem_make.out') - end - - def test_build_extensions_extconf_bad - @spec.extensions << 'extconf.rb' - - e = assert_raises Gem::Installer::ExtensionBuildError do - use_ui @ui do - @builder.build_extensions - end - end - - assert_match(/\AERROR: Failed to build gem native extension.$/, e.message) - - assert_equal "Building native extensions. This could take a while...\n", - @ui.output - assert_equal '', @ui.error - - gem_make_out = File.join @gemhome, 'gems', @spec.full_name, 'gem_make.out' - - assert_match %r%#{Regexp.escape Gem.ruby} extconf\.rb%, - File.read(gem_make_out) - assert_match %r%#{Regexp.escape Gem.ruby}: No such file%, - File.read(gem_make_out) - end - - def test_build_extensions_unsupported - FileUtils.mkdir_p @spec.gem_dir - gem_make_out = File.join @spec.gem_dir, 'gem_make.out' - @spec.extensions << nil - - e = assert_raises Gem::Installer::ExtensionBuildError do - use_ui @ui do - @builder.build_extensions - end - end - - assert_match(/^\s*No builder for extension ''$/, e.message) - - assert_equal "Building native extensions. This could take a while...\n", - @ui.output - assert_equal '', @ui.error - - assert_equal "No builder for extension ''\n", File.read(gem_make_out) - ensure - FileUtils.rm_f gem_make_out - end - - def test_build_extensions_with_build_args - args = ["--aa", "--bb"] - @builder.build_args = args - @spec.extensions << 'extconf.rb' - - FileUtils.mkdir_p @spec.gem_dir - - open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| - f.write <<-'RUBY' - puts "IN EXTCONF" - extconf_args = File.join File.dirname(__FILE__), 'extconf_args' - File.open extconf_args, 'w' do |f| - f.puts ARGV.inspect - end - - File.open 'Makefile', 'w' do |f| - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" - end - RUBY - end - - use_ui @ui do - @builder.build_extensions - end - - path = File.join @spec.gem_dir, "extconf_args" - - assert_equal args.inspect, File.read(path).strip - assert File.directory? File.join(@spec.gem_dir, 'lib') - end - end |