Sha256: 8650ccdd48afa1fe7753a6c7d30f710e34855dde0a9dd0fa7ecd494069337c1d
Contents?: true
Size: 311 Bytes
Versions: 5
Compression:
Stored size: 311 Bytes
Contents
require 'pathname' describe "Pathname#sub" do it "replaces the pattern with rest" do Pathname.new('/usr/local/bin/').sub(/local/, 'fish').to_s.should == '/usr/fish/bin/' end it "returns a new object" do p = Pathname.new('/usr/local/bin/') p.sub(/local/, 'fish').should_not == p end end
Version data entries
5 entries across 5 versions & 1 rubygems