Sha256: 0281c5b814364f5bba7066bd6081c9ec12f6dd32bf9d899013d787eb44795f60

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

require "spec/spec_helper"
require "lib/stowaway/target_context"

describe Stowaway::TargetContext do
  
  let(:context) do
    Stowaway::TargetContext.new(@root)
  end

  before(:each) do
    @root = "/fake/path/to/root/"
  end

  it "should return the path the object was intialized with" do
    context.root.should == @root
  end

  it "should transform path to be relative to the root directory" do
    file_p = @root + "public/images/monkey_skull.gif"
    context.path_relative_to_root(file_p).should == "/public/images/monkey_skull.gif"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stowaway-0.2.5 spec/lib/target_context_spec.rb