summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_ext_rake_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_ext_rake_builder.rb')
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/rubygems/test_gem_ext_rake_builder.rb b/test/rubygems/test_gem_ext_rake_builder.rb
index d30664372d..c8fceb63ee 100644
--- a/test/rubygems/test_gem_ext_rake_builder.rb
+++ b/test/rubygems/test_gem_ext_rake_builder.rb
@@ -24,18 +24,18 @@ class TestGemExtRakeBuilder < Gem::TestCase
output = []
realdir = nil # HACK /tmp vs. /private/tmp
- build_rake_in do
+ build_rake_in do |rake|
Dir.chdir @ext do
realdir = Dir.pwd
Gem::Ext::RakeBuilder.build 'mkrf_conf.rb', nil, @dest_path, output
end
- end
- output = output.join "\n"
+ output = output.join "\n"
- refute_match %r%^rake failed:%, output
- assert_match %r%^#{Regexp.escape @@ruby} mkrf_conf\.rb%, output
- assert_match %r%^#{Regexp.escape @@rake} RUBYARCHDIR=#{Regexp.escape @dest_path} RUBYLIBDIR=#{Regexp.escape @dest_path}%, output
+ refute_match %r%^rake failed:%, output
+ assert_match %r%^#{Regexp.escape @@ruby} mkrf_conf\.rb%, output
+ assert_match %r%^#{Regexp.escape rake} RUBYARCHDIR=#{Regexp.escape @dest_path} RUBYLIBDIR=#{Regexp.escape @dest_path}%, output
+ end
end
def test_class_build_fail
@@ -44,22 +44,22 @@ class TestGemExtRakeBuilder < Gem::TestCase
File.open("Rakefile","w") do |f|
f.puts "task :default do abort 'fail' end"
end
- EO_MKRF
+ EO_MKRF
end
output = []
- error = assert_raises Gem::InstallError do
- build_rake_in do
+ build_rake_in(false) do |rake|
+ error = assert_raises Gem::InstallError do
Dir.chdir @ext do
Gem::Ext::RakeBuilder.build "mkrf_conf.rb", nil, @dest_path, output
end
end
- end
- assert_match %r%^rake failed:%, error.message
- assert_match %r%^#{Regexp.escape @@ruby} mkrf_conf\.rb%, error.message
- assert_match %r%^#{Regexp.escape @@rake} RUBYARCHDIR=#{Regexp.escape @dest_path} RUBYLIBDIR=#{Regexp.escape @dest_path}%, error.message
+ assert_match %r%^rake failed:%, error.message
+ assert_match %r%^#{Regexp.escape @@ruby} mkrf_conf\.rb%, error.message
+ assert_match %r%^#{Regexp.escape rake} RUBYARCHDIR=#{Regexp.escape @dest_path} RUBYLIBDIR=#{Regexp.escape @dest_path}%, error.message
+ end
end
end