Sha256: 395ab074c4072b2a945d34409f8be0f79504ef2523874444bb09a4eafbd5c9b8

Contents?: true

Size: 632 Bytes

Versions: 5

Compression:

Stored size: 632 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'
require 'pathname'

describe "Pathname extensions for VFS" do

  describe "realpath" do
    it "should expand VFS paths" do
      pathname = Pathname.new("vfs:/tmp/test")
      pathname.should_receive(:expand_path).and_return(Pathname.new("/expanded/path"))
      pathname.realpath.to_s.should == "/expanded/path"
    end

    it "should find real path for non-VFS paths" do
      pathname = Pathname.new("/tmp/test")
      pathname.should_receive(:realpath_without_vfs).and_return(Pathname.new("/real/path"))
      pathname.realpath.to_s.should == "/real/path"
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
torquebox-vfs-1.0.1-java spec/pathname_spec.rb
torquebox-vfs-1.0.0-java spec/pathname_spec.rb
torquebox-vfs-1.0.0.CR2-java spec/pathname_spec.rb
torquebox-vfs-1.0.0.CR1-java spec/pathname_spec.rb
org.torquebox.vfs-1.0.0.Beta23 spec/pathname_spec.rb