From e22d8781c8005b068ffa73ecc88728d720b6e870 Mon Sep 17 00:00:00 2001 From: drbrain Date: Sun, 10 Nov 2013 19:37:05 +0000 Subject: * lib/rubygems/specification.rb: Include 2.2.0.preview.2 when checking if extensions should be built. Fixes a ruby-ci failure. * test/rubygems/test_gem_specification.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_specification.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/rubygems/test_gem_specification.rb') diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 3936bc0681..231f10dbf1 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1260,6 +1260,32 @@ dependencies: [] refute_path_exists gem_make_out end + def test_build_extensions_preview + ext_spec + + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + + open extconf_rb, 'w' do |f| + f.write <<-'RUBY' + open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" + end + RUBY + end + + refute_empty @ext.extensions, 'sanity check' + + @ext.installed_by_version = v('2.2.0.preview.2') + + @ext.build_extensions + + gem_make_out = File.join @ext.extension_install_dir, 'gem_make.out' + assert_path_exists gem_make_out + end + def test_contains_requirable_file_eh code_rb = File.join @a1.gem_dir, 'lib', 'code.rb' FileUtils.mkdir_p File.dirname code_rb -- cgit v1.2.3