2015-08-03 13:09:07 +01:00
|
|
|
require "testing_env"
|
2016-01-08 23:35:58 +01:00
|
|
|
require "formula"
|
|
|
|
require "caveats"
|
2015-07-20 21:46:05 +02:00
|
|
|
|
|
|
|
class CaveatsTests < Homebrew::TestCase
|
|
|
|
def setup
|
2017-01-21 11:21:30 +00:00
|
|
|
super
|
2015-07-20 21:46:05 +02:00
|
|
|
@f = formula { url "foo-1.0" }
|
|
|
|
@c = Caveats.new @f
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_f
|
|
|
|
assert_equal @f, @c.f
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_empty?
|
|
|
|
assert @c.empty?
|
|
|
|
|
|
|
|
f = formula do
|
|
|
|
url "foo-1.0"
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
"something"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
c = Caveats.new f
|
|
|
|
|
|
|
|
refute c.empty?
|
|
|
|
end
|
|
|
|
end
|