Skip to content

Instantly share code, notes, and snippets.

@craigmcnamara
Created March 11, 2011 16:09
Show Gist options
  • Save craigmcnamara/866093 to your computer and use it in GitHub Desktop.
Save craigmcnamara/866093 to your computer and use it in GitHub Desktop.
it "should work for home dirs" do
pwd = Dir.pwd
dir = Dir.chdir { Dir.pwd }
dir.downcase.should == ENV['HOME'].downcase # Fails with expected "c:\\users\\craig" got "c:/users/craig" (using ==)
pwd.should == Dir.pwd
end
# Are both of these formats valid?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment