tests: adjust test_bottle_spec_selection for new bottle code
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
47f3fa2d2b
commit
c350fad07e
@ -4,16 +4,18 @@ require 'test/testball'
|
|||||||
# We temporarily redefine bottles_supported? because the
|
# We temporarily redefine bottles_supported? because the
|
||||||
# following tests assume it is true, but other tests may
|
# following tests assume it is true, but other tests may
|
||||||
# expect the real value.
|
# expect the real value.
|
||||||
def bottles_are_supported &block
|
module MacOS extend self
|
||||||
|
def bottles_are_supported
|
||||||
alias :old_bottles_supported? :bottles_supported?
|
alias :old_bottles_supported? :bottles_supported?
|
||||||
def bottles_supported?; true end
|
def bottles_supported?; true end
|
||||||
instance_eval(&block)
|
yield
|
||||||
def bottles_supported?; old_bottles_supported? end
|
def bottles_supported?; old_bottles_supported? end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class BottleTests < Test::Unit::TestCase
|
class BottleTests < Test::Unit::TestCase
|
||||||
def test_bottle_spec_selection
|
def test_bottle_spec_selection
|
||||||
bottles_are_supported do
|
MacOS.bottles_are_supported do
|
||||||
f = SnowLeopardBottleSpecTestBall.new
|
f = SnowLeopardBottleSpecTestBall.new
|
||||||
|
|
||||||
assert_equal case MacOS.cat
|
assert_equal case MacOS.cat
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user