This page contains automated test results for code from O'Reilly's Ruby Cookbook. If this code looks interesting or useful, you might want to buy the whole book.
| Finding and Changing the Current Working Directory | ||
|---|---|---|
| Code | Expected | Actual |
Dir.getwd |
"/home/leonardr" | "/home/leonardr/writing/Ruby Cookbook/recipes/tmp" |
Dir.chdir("/bin")
Dir.getwd |
"/bin" | "/bin" |
File.exists? "ls" |
true | true |