diff options
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_bottles.rb | 38 |
1 files changed, 12 insertions, 26 deletions
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 |
