mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@032ee74
This commit is contained in:
parent
f646d20aae
commit
5aaa75e7c1
263 changed files with 921 additions and 921 deletions
|
|
@ -4,19 +4,19 @@ require 'pathname'
|
|||
describe "Pathname#absolute?" do
|
||||
|
||||
it "returns true for the root directory" do
|
||||
Pathname.new('/').absolute?.should == true
|
||||
Pathname.new('/').should.absolute?
|
||||
end
|
||||
|
||||
it "returns true for a dir starting with a slash" do
|
||||
Pathname.new('/usr/local/bin').absolute?.should == true
|
||||
Pathname.new('/usr/local/bin').should.absolute?
|
||||
end
|
||||
|
||||
it "returns false for a dir not starting with a slash" do
|
||||
Pathname.new('fish').absolute?.should == false
|
||||
Pathname.new('fish').should_not.absolute?
|
||||
end
|
||||
|
||||
it "returns false for a dir not starting with a slash" do
|
||||
Pathname.new('fish/dog/cow').absolute?.should == false
|
||||
Pathname.new('fish/dog/cow').should_not.absolute?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ describe "Pathname.new" do
|
|||
ruby_version_is ''...'2.7' do
|
||||
it "is tainted if path is tainted" do
|
||||
path = '/usr/local/bin'.taint
|
||||
Pathname.new(path).tainted?.should == true
|
||||
Pathname.new(path).should.tainted?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@ require 'pathname'
|
|||
describe "Pathname#relative?" do
|
||||
|
||||
it "returns false for the root directory" do
|
||||
Pathname.new('/').relative?.should == false
|
||||
Pathname.new('/').should_not.relative?
|
||||
end
|
||||
|
||||
it "returns false for a dir starting with a slash" do
|
||||
Pathname.new('/usr/local/bin').relative?.should == false
|
||||
Pathname.new('/usr/local/bin').should_not.relative?
|
||||
end
|
||||
|
||||
it "returns true for a dir not starting with a slash" do
|
||||
Pathname.new('fish').relative?.should == true
|
||||
Pathname.new('fish').should.relative?
|
||||
end
|
||||
|
||||
it "returns true for a dir not starting with a slash" do
|
||||
Pathname.new('fish/dog/cow').relative?.should == true
|
||||
Pathname.new('fish/dog/cow').should.relative?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,23 +4,23 @@ require 'pathname'
|
|||
describe "Pathname#root?" do
|
||||
|
||||
it "returns true for root directories" do
|
||||
Pathname.new('/').root?.should == true
|
||||
Pathname.new('/').should.root?
|
||||
end
|
||||
|
||||
it "returns false for empty string" do
|
||||
Pathname.new('').root?.should == false
|
||||
Pathname.new('').should_not.root?
|
||||
end
|
||||
|
||||
it "returns false for a top level directory" do
|
||||
Pathname.new('/usr').root?.should == false
|
||||
Pathname.new('/usr').should_not.root?
|
||||
end
|
||||
|
||||
it "returns false for a top level with .. appended directory" do
|
||||
Pathname.new('/usr/..').root?.should == false
|
||||
Pathname.new('/usr/..').should_not.root?
|
||||
end
|
||||
|
||||
it "returns false for a directory below top level" do
|
||||
Pathname.new('/usr/local/bin/').root?.should == false
|
||||
Pathname.new('/usr/local/bin/').should_not.root?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue