aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_formula.rb
AgeCommit message (Collapse)Author
2013-09-13Stop exposing the download strategy from FormulaJack Nagel
2013-08-31Add test for option description rulesJack Nagel
2013-08-31Add test for dependency optionsJack Nagel
2013-05-25Add tests for Formula#installed_prefixJack Nagel
2013-04-16Add tests for FormulaPin and simplify implementationJack Nagel
2013-04-13Remove obsolete testsJack Nagel
This behavior is now tested at more appropriate levels in test_software_spec, test_formula_spec_selection, and test_formula_validation.
2013-04-13Improved formula attribute validationJack Nagel
The initializer for Formula does a number of validations, but it does them in a weird order, and some attributes aren't validated under certain circumstances. This became even more of a mess when most software package attributes were moved into the SoftwareSpec class. This commit removes the last vestiges of storing these attributes as instance variables. In particular, it eliminates #set_instance_variable and #validate_variable, replacing them with methods that operate on SoftwareSpec instances, and generate more useful errors. Doing these validations unconditionally in the initializer means we bail out much earlier if the formula has invalid attributes or is not fully specified, and no longer need to validate in #prefix. Technically we don't need to validate in #brew either, but we continue to do so anyway as a safety measure, and because we cannot enforce calls to super in subclasses.
2013-04-10Eliminate test_bucketJack Nagel
Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places.
2013-04-10Make test formulae initializers more flexibleJack Nagel
2013-04-10Move formula equality tests out of test_bucketJack Nagel
2013-04-09Check existence rather than rescue exceptionsJack Nagel
2013-04-08Clean up mirror support testJack Nagel
2013-04-08Fix specs in TestBallJack Nagel
2013-04-08Ensure ARGV is cleaned upJack Nagel
2013-04-07Simplify testsJack Nagel
2013-04-02Don't use "assert_not_nil"Jack Nagel
2013-04-01Silence stderr in test suiteJack Nagel
2013-03-28Suppress ambiguous argument and grouped expression warningsJack Nagel
2013-03-18Simplify SoftwareSpec checksum methodsJack Nagel
Reader methods for specific checksum types have been absent from the Formula class for some time, so there isn't any reason to expose them in SoftwareSpec, either. Thus, these methods now only act as setters, and #checksum should be used to access the constructed Checksum object.
2013-03-09Fix tests under 32-bit SLJack Nagel
2013-02-18Remove unused variablesJack Nagel
2013-02-11Avoid nil in URL specsJack Nagel
2013-01-30Remove MD5 support.Mike McQuaid
Closes Homebrew/homebrew#17317.
2013-01-29Don't use underscores in (new) bottle filenames.Mike McQuaid
Closes Homebrew/homebrew#14270
2013-01-29Cleanup old bottle syntax.Mike McQuaid
2012-09-29tests: set newly-visible global constantsJack Nagel
The changes to error ouput and logging require a few more things to be visible during installation tests. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add support for custom version schemesJack Nagel
A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
2012-08-18Add Version#detected_from_url?Jack Nagel
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-09Deprecate ancient formula syntaxJack Nagel
Closes Homebrew/homebrew#13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05tests: expect that mirror lists are empty, not nilJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04tests: clean up whitespaceJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Demonstrate that bottles are selected correctlyJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Prune some requires from test filesJack Nagel
testing_env already requires utils; set up the ARGV and ENV extensions there as well. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Refactor checksummingJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Introduce new formula specsJack Nagel
2012-04-14tests: reorganize compiler selection testsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-09tests: fix no-op fails_with testJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06tests: silence mirror testJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06Fix protection against overriding Formula#brewJack Nagel
The test for this previously passed, but only because the constructor for SoftwareSpecification was raising an exception. method_added needs to be a class method because methods are being defined on the class, not the object, and to test it properly we have to eval the class in the test itself. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01Reset compiler when testing fails_withJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01New fails_with infrastructureJack Nagel
- Formulae can now declare failures on any compiler. - FailsWithLLVM and associated formula elements have been moved to compat. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19mirror support: Add testCharlie Sharpsteen
2011-03-12Refactor the brew command into one file per commandMax Howell
The code was sucking. To the extent that maintenance was hard. It's a lot easier to work with code that is sensibly split at sensible boundaries. So now it is more like that. But the refactor is minimal. Because we don't want you to have more merge hell than absolutely necessary. If you merge you will need to pay attention to brew.h.rb (as it is deleted) and bin/brew (as command logic is gone). It will be painful, but you will just have to help git out by moving any changes around manually. Note compatibility.rb. It ensures that any function renames or removals don't break anything. We're pretty serious about backwards compatibility. And that's because we encourage you to hack around with the innards. And we couldn't do that if we would then just make stuff disappear behind your back.
2010-04-06Split out some Formula tests.Adam Vandenberg