brew style: replace tabs with spaces
This commit is contained in:
parent
14d7a7a08c
commit
c83dd0d04b
@ -12,41 +12,41 @@ describe DependencyCollector do
|
|||||||
|
|
||||||
context "when xz, zip, and bzip2 are not available" do
|
context "when xz, zip, and bzip2 are not available" do
|
||||||
it "creates a resource dependency from a '.xz' URL" do
|
it "creates a resource dependency from a '.xz' URL" do
|
||||||
resource.url("http://example.com/foo.xz")
|
resource.url("http://example.com/foo.xz")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("xz")
|
allow_any_instance_of(Object).to receive(:which).with("xz")
|
||||||
expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
|
expect(subject.add(resource)).to eq(Dependency.new("xz", [:build]))
|
||||||
end
|
end
|
||||||
|
|
||||||
it "creates a resource dependency from a '.zip' URL" do
|
it "creates a resource dependency from a '.zip' URL" do
|
||||||
resource.url("http://example.com/foo.zip")
|
resource.url("http://example.com/foo.zip")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("zip")
|
allow_any_instance_of(Object).to receive(:which).with("zip")
|
||||||
expect(subject.add(resource)).to eq(Dependency.new("zip", [:build]))
|
expect(subject.add(resource)).to eq(Dependency.new("zip", [:build]))
|
||||||
end
|
end
|
||||||
|
|
||||||
it "creates a resource dependency from a '.bz2' URL" do
|
it "creates a resource dependency from a '.bz2' URL" do
|
||||||
resource.url("http://example.com/foo.tar.bz2")
|
resource.url("http://example.com/foo.tar.bz2")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("bzip2")
|
allow_any_instance_of(Object).to receive(:which).with("bzip2")
|
||||||
expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
|
expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when xz, zip, and bzip2 are available" do
|
context "when xz, zip, and bzip2 are available" do
|
||||||
it "does not create a resource dependency from a '.xz' URL" do
|
it "does not create a resource dependency from a '.xz' URL" do
|
||||||
resource.url("http://example.com/foo.xz")
|
resource.url("http://example.com/foo.xz")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo"))
|
allow_any_instance_of(Object).to receive(:which).with("xz").and_return(Pathname.new("foo"))
|
||||||
expect(subject.add(resource)).to be nil
|
expect(subject.add(resource)).to be nil
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not create a resource dependency from a '.zip' URL" do
|
it "does not create a resource dependency from a '.zip' URL" do
|
||||||
resource.url("http://example.com/foo.zip")
|
resource.url("http://example.com/foo.zip")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("zip").and_return(Pathname.new("foo"))
|
allow_any_instance_of(Object).to receive(:which).with("zip").and_return(Pathname.new("foo"))
|
||||||
expect(subject.add(resource)).to be nil
|
expect(subject.add(resource)).to be nil
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not create a resource dependency from a '.bz2' URL" do
|
it "does not create a resource dependency from a '.bz2' URL" do
|
||||||
resource.url("http://example.com/foo.tar.bz2")
|
resource.url("http://example.com/foo.tar.bz2")
|
||||||
allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo"))
|
allow_any_instance_of(Object).to receive(:which).with("bzip2").and_return(Pathname.new("foo"))
|
||||||
expect(subject.add(resource)).to be nil
|
expect(subject.add(resource)).to be nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user