aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-07-15 21:55:14 -0500
committerJack Nagel2014-07-15 21:55:14 -0500
commit68326805aecfb11cc15976f846019d0616352da8 (patch)
tree42ba08ebbe4f072a1485dd26908d0445203b9076 /Library/Homebrew/test
parent26f4a788252065f8149b39442502e3bdb890e5bd (diff)
downloadbrew-68326805aecfb11cc15976f846019d0616352da8.tar.bz2
Implement []= on BottleCollector
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_bottle_collector.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/test/test_bottle_collector.rb b/Library/Homebrew/test/test_bottle_collector.rb
index 2fe2bb919..8cf75718a 100644
--- a/Library/Homebrew/test/test_bottle_collector.rb
+++ b/Library/Homebrew/test/test_bottle_collector.rb
@@ -7,8 +7,8 @@ class BottleCollectorTests < Homebrew::TestCase
end
def test_collector_returns_passed_tags
- @collector.add('foo', :lion)
- @collector.add('bar', :mountain_lion)
+ @collector[:lion] = "foo"
+ @collector[:mountain_lion] = "bar"
assert_equal ['bar', :mountain_lion], @collector.fetch_bottle_for(:mountain_lion)
end
@@ -17,19 +17,19 @@ class BottleCollectorTests < Homebrew::TestCase
end
def test_collector_finds_or_later_tags
- @collector.add('foo', :lion_or_later)
+ @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)
end
def test_collector_prefers_exact_matches
- @collector.add('foo', :lion_or_later)
- @collector.add('bar', :mountain_lion)
+ @collector[:lion_or_later] = "foo"
+ @collector[:mountain_lion] = "bar"
assert_equal ['bar', :mountain_lion], @collector.fetch_bottle_for(:mountain_lion)
end
def test_collector_finds_altivec_tags
- @collector.add('foo', :tiger_altivec)
+ @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)