diff options
| author | Jack Nagel | 2014-07-31 19:37:39 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-31 19:59:09 -0500 |
| commit | 4226386ef99e71c149b0bb45cba4dca5c52e6054 (patch) | |
| tree | 056a0f0c368624863600201081c7cd63e3d10c4d /Library/Homebrew/test | |
| parent | 1b182b422bedeb0cd12f6634a692399242e140fd (diff) | |
| download | homebrew-4226386ef99e71c149b0bb45cba4dca5c52e6054.tar.bz2 | |
Hide the options data structure better
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_build_options.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_software_spec.rb | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/Library/Homebrew/test/test_build_options.rb b/Library/Homebrew/test/test_build_options.rb index b73108bff..11b3145ba 100644 --- a/Library/Homebrew/test/test_build_options.rb +++ b/Library/Homebrew/test/test_build_options.rb @@ -15,11 +15,6 @@ class BuildOptionsTests < Homebrew::TestCase @build.as_flags.sort end - def test_has_option? - assert @build.has_option?("with-foo") - assert !@build.has_option?("with-qux") - end - def test_include assert_includes @build, "with-foo" refute_includes @build, "with-qux" diff --git a/Library/Homebrew/test/test_software_spec.rb b/Library/Homebrew/test/test_software_spec.rb index 02f586569..26bfd4aff 100644 --- a/Library/Homebrew/test/test_software_spec.rb +++ b/Library/Homebrew/test/test_software_spec.rb @@ -44,7 +44,7 @@ class SoftwareSpecTests < Homebrew::TestCase def test_option @spec.option('foo') - assert @spec.build.has_option? 'foo' + assert @spec.option_defined?("foo") end def test_option_raises_when_begins_with_dashes @@ -57,7 +57,7 @@ class SoftwareSpecTests < Homebrew::TestCase def test_option_accepts_symbols @spec.option(:foo) - assert @spec.build.has_option? 'foo' + assert @spec.option_defined?("foo") end def test_depends_on @@ -68,8 +68,8 @@ class SoftwareSpecTests < Homebrew::TestCase def test_dependency_option_integration @spec.depends_on 'foo' => :optional @spec.depends_on 'bar' => :recommended - assert @spec.build.has_option?('with-foo') - assert @spec.build.has_option?('without-bar') + assert @spec.option_defined?("with-foo") + assert @spec.option_defined?("without-bar") end def test_explicit_options_override_default_dep_option_description |
