summaryrefslogtreecommitdiff
path: root/test/mkmf
diff options
context:
space:
mode:
Diffstat (limited to 'test/mkmf')
-rw-r--r--test/mkmf/test_have_macro.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/mkmf/test_have_macro.rb b/test/mkmf/test_have_macro.rb
index 5ee953c68f..43c4029f70 100644
--- a/test/mkmf/test_have_macro.rb
+++ b/test/mkmf/test_have_macro.rb
@@ -10,13 +10,12 @@ class TestMkmf
end
def test_have_macro_header
- Tempfile.open(%w"test_mkmf .h", ".") do |tmp|
+ Tempfile.create(%w"test_mkmf .h", ".") do |tmp|
tmp.puts("#undef #{MACRO_NAME}")
tmp.puts("#define #{MACRO_NAME} 1")
tmp.close
base = File.basename(tmp.path)
assert_equal(true, have_macro(MACRO_NAME, base, "-I."), MKMFLOG)
- tmp.close(true)
end
end
@@ -25,12 +24,11 @@ class TestMkmf
end
def test_not_have_macro_header
- Tempfile.open(%w"test_mkmf .h", ".") do |tmp|
+ Tempfile.create(%w"test_mkmf .h", ".") do |tmp|
tmp.puts("#undef #{MACRO_NAME}")
tmp.close
base = File.basename(tmp.path)
assert_equal(false, have_macro(MACRO_NAME, base, "-I."), MKMFLOG)
- tmp.close(true)
end
end
end