Add more test coverage for option descriptions

This commit is contained in:
Jack Nagel 2014-08-07 00:48:13 -05:00
parent e34a497b3e
commit 20452f3edc

View File

@ -66,6 +66,16 @@ class SoftwareSpecTests < Homebrew::TestCase
refute @spec.option_defined?("cxx11") refute @spec.option_defined?("cxx11")
end end
def test_option_description
@spec.option("bar", "description")
assert_equal "description", @spec.options.first.description
end
def test_option_description_defaults_to_empty_string
@spec.option("foo")
assert_equal "", @spec.options.first.description
end
def test_depends_on def test_depends_on
@spec.depends_on('foo') @spec.depends_on('foo')
assert_equal 'foo', @spec.deps.first.name assert_equal 'foo', @spec.deps.first.name