[macruby-changes] [1833] MacRuby/branches/experimental/spec/frozen/core/file/expand_path_spec .rb

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 10 04:26:29 PDT 2009


Revision: 1833
          http://trac.macosforge.org/projects/ruby/changeset/1833
Author:   eloy.de.enige at gmail.com
Date:     2009-06-10 04:26:28 -0700 (Wed, 10 Jun 2009)
Log Message:
-----------
Added extra example for File.expand_path

Modified Paths:
--------------
    MacRuby/branches/experimental/spec/frozen/core/file/expand_path_spec.rb

Modified: MacRuby/branches/experimental/spec/frozen/core/file/expand_path_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/file/expand_path_spec.rb	2009-06-10 01:35:55 UTC (rev 1832)
+++ MacRuby/branches/experimental/spec/frozen/core/file/expand_path_spec.rb	2009-06-10 11:26:28 UTC (rev 1833)
@@ -79,6 +79,10 @@
       File.expand_path("~#{ENV['USER']}").should == ENV['HOME']
       File.expand_path("~#{ENV['USER']}/a").should == "#{ENV['HOME']}/a"
     end
+
+    it "expands ../foo with ~/dir as base dir to /path/to/user/home/foo" do
+      File.expand_path('../foo', '~/dir').should == "#{ENV['HOME']}/foo"
+    end
   end
 
   it "raises an ArgumentError is not passed one or two arguments" do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090610/89a6d1de/attachment.html>


More information about the macruby-changes mailing list