Permalink
Browse files

Check for a nonexistent dir in a tempdir to avoid the /nonexistent th…

…at appears to exist on travis-ci runners
  • Loading branch information...
1 parent 0f346c4 commit 0f7447ed3a4f8ec4257b1caa37d0ba6be4ae0584 @drbrain drbrain committed Dec 14, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/test_rdoc_ri_driver.rb
View
9 test/test_rdoc_ri_driver.rb
@@ -613,11 +613,14 @@ def tty.tty?() true; end
def test_in_path_eh
path = ENV['PATH']
- refute @driver.in_path?('/nonexistent')
+ temp_dir do |dir|
+ nonexistent = File.join dir, 'nonexistent'
+ refute @driver.in_path?(nonexistent)
- ENV['PATH'] = File.expand_path '..', __FILE__
+ ENV['PATH'] = File.expand_path '..', __FILE__
- assert @driver.in_path?(File.basename(__FILE__))
+ assert @driver.in_path?(File.basename(__FILE__))
+ end
ensure
ENV['PATH'] = path
end

0 comments on commit 0f7447e

Please sign in to comment.