summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rbconfig/rbconfig_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/rbconfig/rbconfig_spec.rb')
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index c204d5326fd..015c2972b20 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -59,11 +59,17 @@ describe 'RbConfig::CONFIG' do
out.should_not be_empty
end
+ require 'tempfile'
it "['STRIP'] exists and can be executed" do
strip = RbConfig::CONFIG.fetch('STRIP')
- out = `#{strip} --version`
- $?.should.success?
- out.should_not be_empty
+ Tempfile.open('sh') do |dst|
+ File.open('/bin/sh', 'rb') do |src|
+ IO.copy_stream(src, dst)
+ dst.flush
+ out =`#{strip} #{dst.to_path}`
+ $?.should.success?
+ end
+ end
end
end
end