@@ -15,15 +15,12 @@ def setup
1515 end
1616
1717 def test_class_build
18- if Gem . java_platform?
19- pend ( "failing on jruby" )
20- end
21-
2218 if vc_windows? && !nmake_found?
2319 pend ( "test_class_build skipped - nmake not found" )
2420 end
2521
2622 File . open File . join ( @ext , "extconf.rb" ) , "w" do |extconf |
23+ extconf . puts "return if Gem.java_platform?"
2724 extconf . puts "require 'mkmf'\n create_makefile 'foo'"
2825 end
2926
@@ -35,20 +32,22 @@ def test_class_build
3532
3633 assert_match ( /^current directory:/ , output [ 0 ] )
3734 assert_match ( /^#{ Regexp . quote ( Gem . ruby ) } .* extconf.rb/ , output [ 1 ] )
38- assert_equal "creating Makefile\n " , output [ 2 ]
39- assert_match ( /^current directory:/ , output [ 3 ] )
40- assert_contains_make_command "clean" , output [ 4 ]
41- assert_contains_make_command "" , output [ 7 ]
42- assert_contains_make_command "install" , output [ 10 ]
35+
36+ if Gem . java_platform?
37+ assert_includes ( output , "Skipping make for extconf.rb as no Makefile was found." )
38+ else
39+ assert_equal "creating Makefile\n " , output [ 2 ]
40+ assert_match ( /^current directory:/ , output [ 3 ] )
41+ assert_contains_make_command "clean" , output [ 4 ]
42+ assert_contains_make_command "" , output [ 7 ]
43+ assert_contains_make_command "install" , output [ 10 ]
44+ end
45+
4346 assert_empty Dir . glob ( File . join ( @ext , "siteconf*.rb" ) )
4447 assert_empty Dir . glob ( File . join ( @ext , ".gem.*" ) )
4548 end
4649
4750 def test_class_build_rbconfig_make_prog
48- if Gem . java_platform?
49- pend ( "failing on jruby" )
50- end
51-
5251 configure_args do
5352 File . open File . join ( @ext , "extconf.rb" ) , "w" do |extconf |
5453 extconf . puts "require 'mkmf'\n create_makefile 'foo'"
@@ -72,10 +71,6 @@ def test_class_build_env_make
7271 env_large_make = ENV . delete "MAKE"
7372 ENV [ "MAKE" ] = "anothermake"
7473
75- if Gem . java_platform?
76- pend ( "failing on jruby" )
77- end
78-
7974 configure_args "" do
8075 File . open File . join ( @ext , "extconf.rb" ) , "w" do |extconf |
8176 extconf . puts "require 'mkmf'\n create_makefile 'foo'"
@@ -206,11 +201,11 @@ def test_class_make
206201 end
207202
208203 def test_class_make_no_Makefile
209- error = assert_raise Gem ::InstallError do
204+ error = assert_raise Gem ::Ext :: Builder :: NoMakefileError do
210205 Gem ::Ext ::ExtConfBuilder . make @ext , [ "output" ] , @ext
211206 end
212207
213- assert_equal " Makefile not found" , error . message
208+ assert_match ( /No Makefile found/ , error . message )
214209 end
215210
216211 def configure_args ( args = nil )
0 commit comments