diff options
| author | Jack Nagel | 2014-07-16 14:52:18 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-16 14:52:18 -0500 |
| commit | 33eed80ccc0a6abf20060afa88fdb063ccbfc968 (patch) | |
| tree | 66dbcdfe7c144a9906b72afe6c1cc23ece6c618a /Library/Homebrew/test | |
| parent | 68326805aecfb11cc15976f846019d0616352da8 (diff) | |
| download | brew-33eed80ccc0a6abf20060afa88fdb063ccbfc968.tar.bz2 | |
Rename fetch_bottle_for to fetch_checksum_for
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_bottle_collector.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Library/Homebrew/test/test_bottle_collector.rb b/Library/Homebrew/test/test_bottle_collector.rb index 8cf75718a..2de1424a2 100644 --- a/Library/Homebrew/test/test_bottle_collector.rb +++ b/Library/Homebrew/test/test_bottle_collector.rb @@ -6,33 +6,37 @@ class BottleCollectorTests < Homebrew::TestCase @collector = BottleCollector.new end + def checksum_for(tag) + @collector.fetch_checksum_for(tag) + end + def test_collector_returns_passed_tags @collector[:lion] = "foo" @collector[:mountain_lion] = "bar" - assert_equal ['bar', :mountain_lion], @collector.fetch_bottle_for(:mountain_lion) + assert_equal ['bar', :mountain_lion], checksum_for(:mountain_lion) end def test_collector_returns_nil_on_no_matches - assert_nil @collector.fetch_bottle_for(:foo) + assert_nil checksum_for(:foo) end def test_collector_finds_or_later_tags @collector[:lion_or_later] = "foo" - assert_equal ['foo', :lion_or_later], @collector.fetch_bottle_for(:mountain_lion) - assert_nil @collector.fetch_bottle_for(:snow_leopard) + assert_equal ['foo', :lion_or_later], checksum_for(:mountain_lion) + assert_nil checksum_for(:snow_leopard) end def test_collector_prefers_exact_matches @collector[:lion_or_later] = "foo" @collector[:mountain_lion] = "bar" - assert_equal ['bar', :mountain_lion], @collector.fetch_bottle_for(:mountain_lion) + assert_equal ['bar', :mountain_lion], checksum_for(:mountain_lion) end def test_collector_finds_altivec_tags @collector[:tiger_altivec] = "foo" - assert_equal ['foo', :tiger_altivec], @collector.fetch_bottle_for(:tiger_g4) - assert_equal ['foo', :tiger_altivec], @collector.fetch_bottle_for(:tiger_g4e) - assert_equal ['foo', :tiger_altivec], @collector.fetch_bottle_for(:tiger_g5) - assert_nil @collector.fetch_bottle_for(:tiger_g3) + assert_equal ['foo', :tiger_altivec], checksum_for(:tiger_g4) + assert_equal ['foo', :tiger_altivec], checksum_for(:tiger_g4e) + assert_equal ['foo', :tiger_altivec], checksum_for(:tiger_g5) + assert_nil checksum_for(:tiger_g3) end end |
