Sha256: aef032b9a03247df6e668e29f4d437b4802c073b65faf591cb0268eb308333d5
Contents?: true
Size: 697 Bytes
Versions: 30
Compression:
Stored size: 697 Bytes
Contents
require_relative "../spec_helper" describe "strip_path_prefix plugin" do it "strips path prefix when expanding paths" do app(:bare){} abs_dir = app.expand_path('spec') app.plugin :strip_path_prefix app.expand_path('spec').must_equal 'spec' File.expand_path(app.expand_path('spec'), Dir.pwd).must_equal abs_dir app.expand_path('/foo').must_equal '/foo' app.expand_path('bar', '/foo').must_equal '/foo/bar' app.opts[:root] = '/foo' app.expand_path('bar').must_equal '/foo/bar' app.plugin :strip_path_prefix, '/foo' app.expand_path('bar').must_equal 'bar' app.opts[:root] = '/foo/bar' app.expand_path('baz').must_equal 'bar/baz' end end
Version data entries
30 entries across 30 versions & 1 rubygems