From 8f3579302017a90e4cafe911fcd0de122005e55c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 1 Mar 2013 17:44:58 +0000 Subject: Support 32-bit 10.6 bottles. Closes Homebrew/homebrew#17735. Signed-off-by: Mike McQuaid --- Library/Homebrew/test/test_bottles.rb | 38 +++++++++++------------------------ 1 file changed, 12 insertions(+), 26 deletions(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/test_bottles.rb b/Library/Homebrew/test/test_bottles.rb index 19d502b72..5c18cc681 100644 --- a/Library/Homebrew/test/test_bottles.rb +++ b/Library/Homebrew/test/test_bottles.rb @@ -1,36 +1,22 @@ require 'testing_env' require 'test/testball' -# We temporarily redefine bottles_supported? because the -# following tests assume it is true, but other tests may -# expect the real value. -module MacOS extend self - def bottles_are_supported - alias :old_bottles_supported? :bottles_supported? - def bottles_supported?; true end - yield - def bottles_supported?; old_bottles_supported? end - end -end - class BottleTests < Test::Unit::TestCase def test_bottle_spec_selection - MacOS.bottles_are_supported do - f = SnowLeopardBottleSpecTestBall.new + f = SnowLeopardBottleSpecTestBall.new - assert_equal case MacOS.cat - when :snow_leopard then f.bottle - else f.stable - end, f.active_spec + assert_equal case MacOS.cat + when :snow_leopard then f.bottle + else f.stable + end, f.active_spec - f = LionBottleSpecTestBall.new - assert_equal case MacOS.cat - when :lion then f.bottle - else f.stable - end, f.active_spec + f = LionBottleSpecTestBall.new + assert_equal case MacOS.cat + when :lion then f.bottle + else f.stable + end, f.active_spec - f = AllCatsBottleSpecTestBall.new - assert_equal f.bottle, f.active_spec - end + f = AllCatsBottleSpecTestBall.new + assert_equal f.bottle, f.active_spec end end -- cgit v1.2.3