brew/Library/Homebrew/test/utils/bottles/collector_spec.rb
Mike McQuaid 170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00

27 lines
782 B
Ruby

require "utils/bottles"
describe Utils::Bottles::Collector do
describe "#fetch_checksum_for" do
it "returns passed tags" do
subject[:lion] = "foo"
subject[:mountain_lion] = "bar"
expect(subject.fetch_checksum_for(:mountain_lion)).to eq(["bar", :mountain_lion])
end
it "returns nil if empty" do
expect(subject.fetch_checksum_for(:foo)).to be nil
end
it "returns nil when there is no match" do
subject[:lion] = "foo"
expect(subject.fetch_checksum_for(:foo)).to be nil
end
it "uses older tags when needed", :needs_macos do
subject[:lion] = "foo"
expect(subject.fetch_checksum_for(:mountain_lion)).to eq(["foo", :lion])
expect(subject.fetch_checksum_for(:snow_leopard)).to be nil
end
end
end