diff options
Diffstat (limited to 'Library/Homebrew/test/resource_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/resource_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Homebrew/test/resource_spec.rb b/Library/Homebrew/test/resource_spec.rb index 7eef3268d..50e174ed4 100644 --- a/Library/Homebrew/test/resource_spec.rb +++ b/Library/Homebrew/test/resource_spec.rb @@ -119,6 +119,31 @@ describe Resource do end end + describe "#owner" do + it "sets the owner" do + owner = Object.new + subject.owner = owner + expect(subject.owner).to eq(owner) + end + + it "sets its owner to be the patches' owner" do + subject.patch(:p1) { url "file:///my.patch" } + owner = Object.new + subject.owner = owner + subject.patches.each do |p| + expect(p.resource.owner).to eq(owner) + end + end + end + + describe "#patch" do + it "adds a patch" do + subject.patch(:p1, :DATA) + expect(subject.patches.count).to eq(1) + expect(subject.patches.first.strip).to eq(:p1) + end + end + specify "#verify_download_integrity_missing" do fn = Pathname.new("test") |
