aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_formula_validation.rb
AgeCommit message (Collapse)Author
2014-12-28Use formula helper in testsJack Nagel
2014-12-26Unroll validation loopJack Nagel
2014-12-26Overriding #initialize is not supported, so drop late validationJack Nagel
2014-10-30Use more relevant assertionsJack Nagel
2014-06-18Use a custom test class so we can avoid monkeypatchingJack Nagel
2014-04-06Clean up test classesJack Nagel
2013-10-14Assert on state, not something that didn't happenJack Nagel
2013-07-22Silence warningsJack Nagel
2013-06-07Fix failing testJack Nagel
2013-05-25tests: extract common formula helperJack Nagel
2013-04-27Don't test error messageJack Nagel
Now that we are testing for a custom exception type, we don't need to make any assertion about the message.
2013-04-27Allow `brew versions` to work with underspecified formulaeJack Nagel
2013-04-13Make a specific assertion in this testJack Nagel
2013-04-13Raise a useful exception for incomplete formulaeJack Nagel
2013-04-13Allow "devel-only" formulaeJack Nagel
It seems only natural that this should be possible, or at the very least, it should not result in calling methods on nil.
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.