summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-04 06:33:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-04 06:33:48 +0000
commita95a87c0bc0ee694e880b680865072babe168802 (patch)
tree08e0ab2efb124e70540bc14a0278c5ee2f95cb48 /test/rubygems
parenta5a4963018590c80019c361c5fe2701fc8606dae (diff)
ext_conf_builder.rb: install via temporary directory
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build): fix for unusal cases again. install to a temporary directory once and move instaled files to the destination directory, if it is same as the current directory. [Bug #7698] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_installer.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index fcbe081593..cf35a534b9 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -1038,7 +1038,17 @@ gem 'other', version
RUBY
end
+ Dir.mkdir(File.join("lib", @spec.name))
+ rb2 = File.join("lib", @spec.name, "#{@spec.name}.rb")
+ @spec.files << rb2
+ write_file File.join(@tempdir, rb2) do |io|
+ io.write <<-RUBY
+ # #{@spec.name}/#{@spec.name}.rb
+ RUBY
+ end
+
assert !File.exist?(File.join(@spec.gem_dir, rb))
+ assert !File.exist?(File.join(@spec.gem_dir, rb2))
use_ui @ui do
path = Gem::Package.build @spec
@@ -1046,6 +1056,7 @@ gem 'other', version
@installer.install
end
assert File.exist?(File.join(@spec.gem_dir, rb))
+ assert File.exist?(File.join(@spec.gem_dir, rb2))
end
def test_install_extension_flat