mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
envutil.rb: assert_file and assert_file_not
* test/ruby/envutil.rb (assert_file, assert_file_not): more descriptive assertions for File predicates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3efce6df1
commit
428ec4ec05
8 changed files with 33 additions and 18 deletions
|
@ -403,8 +403,8 @@ class TestProcess < Test::Unit::TestCase
|
|||
with_tmpchdir {|d|
|
||||
Dir.mkdir "foo"
|
||||
system(*PWD, :chdir => "foo", :out => "open_chdir_test")
|
||||
assert(File.exist?("open_chdir_test"))
|
||||
assert(!File.exist?("foo/open_chdir_test"))
|
||||
assert_file(:exist?, "open_chdir_test")
|
||||
assert_file_not(:exist?, "foo/open_chdir_test")
|
||||
assert_equal("#{d}/foo", File.read("open_chdir_test").chomp)
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue