Adding tests for dependency_collector on Linux
This commit is contained in:
parent
5a92976120
commit
a53171d9fe
@ -140,3 +140,4 @@ describe DependencyCollector do
|
||||
end
|
||||
end
|
||||
end
|
||||
require "test/os/dependency_collector_spec"
|
||||
|
||||
1
Library/Homebrew/test/os/dependency_collector_spec.rb
Normal file
1
Library/Homebrew/test/os/dependency_collector_spec.rb
Normal file
@ -0,0 +1 @@
|
||||
require "test/os/linux/dependency_collector_spec" if OS.linux?
|
||||
23
Library/Homebrew/test/os/linux/dependency_collector_spec.rb
Normal file
23
Library/Homebrew/test/os/linux/dependency_collector_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require "dependency_collector"
|
||||
|
||||
describe DependencyCollector do
|
||||
alias_matcher :be_a_build_requirement, :be_build
|
||||
|
||||
after(:each) do
|
||||
described_class.clear_cache
|
||||
end
|
||||
|
||||
describe "#add" do
|
||||
it "creates a resource dependency from a '.zip' URL" do
|
||||
resource = Resource.new
|
||||
resource.url("http://example.com/foo.zip")
|
||||
expect(subject.add(resource)).to eq(Dependency.new("zip", [:build]))
|
||||
end
|
||||
|
||||
it "creates a resource dependency from a '.bzip2' URL" do
|
||||
resource = Resource.new
|
||||
resource.url("http://example.com/foo.tar.bzip2")
|
||||
expect(subject.add(resource)).to eq(Dependency.new("bzip2", [:build]))
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user