diff options
Diffstat (limited to 'Library/Homebrew/test/os/linux')
| -rw-r--r-- | Library/Homebrew/test/os/linux/dependency_collector_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Library/Homebrew/test/os/linux/dependency_collector_spec.rb b/Library/Homebrew/test/os/linux/dependency_collector_spec.rb new file mode 100644 index 000000000..37d61c89b --- /dev/null +++ b/Library/Homebrew/test/os/linux/dependency_collector_spec.rb @@ -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 |
