2012-06-20 00:34:05 -05:00
|
|
|
require 'testing_env'
|
|
|
|
require 'test/testball'
|
|
|
|
|
|
|
|
class BottleTests < Test::Unit::TestCase
|
|
|
|
def test_bottle_spec_selection
|
2013-03-01 17:44:58 +00:00
|
|
|
f = SnowLeopardBottleSpecTestBall.new
|
2012-06-20 00:34:05 -05:00
|
|
|
|
2013-03-01 17:44:58 +00:00
|
|
|
assert_equal case MacOS.cat
|
|
|
|
when :snow_leopard then f.bottle
|
|
|
|
else f.stable
|
|
|
|
end, f.active_spec
|
2012-06-20 00:34:05 -05:00
|
|
|
|
2013-03-01 17:44:58 +00:00
|
|
|
f = LionBottleSpecTestBall.new
|
|
|
|
assert_equal case MacOS.cat
|
|
|
|
when :lion then f.bottle
|
|
|
|
else f.stable
|
|
|
|
end, f.active_spec
|
2012-06-20 00:34:05 -05:00
|
|
|
|
2013-03-01 17:44:58 +00:00
|
|
|
f = AllCatsBottleSpecTestBall.new
|
|
|
|
assert_equal f.bottle, f.active_spec
|
2012-06-20 00:34:05 -05:00
|
|
|
end
|
|
|
|
end
|