Skip to content
Snippets Groups Projects
Commit 1c7238e5 authored by Markus Reiter's avatar Markus Reiter
Browse files

Add tests for `PATH#select` and `PATH#reject`.

parent 005f165d
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,18 @@ describe PATH do
end
end
describe "#select" do
it "returns an object of the same class instead of an Array" do
expect(described_class.new.select { true }).to be_a(described_class)
end
end
describe "#reject" do
it "returns an object of the same class instead of an Array" do
expect(described_class.new.reject { true }).to be_a(described_class)
end
end
describe "#existing" do
it "returns a new PATH without non-existent paths" do
allow(File).to receive(:directory?).with("/path1").and_return(true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment