Misty De Meo
4fdbb2d685
CompilerSelector: raise when no compatible compiler
...
This replaces the old behaviour of falling back to the original
compiler with no messaging.
Fixes Homebrew/homebrew#19170 .
Fixes mistydemeo/tigerbrew#45 .
2013-05-20 23:25:15 -05:00
Jack Nagel
863d2b253a
Add test for ARGV.flag?
2013-05-20 22:34:53 -05:00
Jack Nagel
e0c4fd5b72
test_keg: reduce noise by including FileUtils
2013-05-14 16:29:36 -05:00
Jack Nagel
cf2b0f88e6
test_keg: make mode an ivar
2013-05-14 16:29:36 -05:00
Jack Nagel
2d93935e6a
Add type accessors to Dependencies
2013-05-10 23:45:06 -05:00
Jack Nagel
12f4ccd7f3
Refactor Dependency.expand
2013-05-10 23:45:05 -05:00
Jack Nagel
3be67f7252
Reorganize compat
2013-05-10 23:27:28 -05:00
Desmond Brand
ba93e6d363
Overwrite broken symlinks with --overwrite
...
Closes Homebrew/homebrew#19480 .
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-05-09 09:21:34 -05:00
Jack Nagel
b322020338
Reduce allocations in dependency construction
...
By always passing around a single, unnested array rather than splatting
and then defensively flattening and compacting things, we can avoid
allocating a bunch of unnecessary arrays. This gives a performance boost
of roughly 4% when enumerating 2500 formulae, and has the side effect of
cleaning up the dependency API.
2013-05-06 16:08:50 -05:00
Jack Nagel
894a6c9776
TypeError is appropriate here
2013-05-06 16:08:49 -05:00
Jack Nagel
bffe090b21
Don't test error message
...
Now that we are testing for a custom exception type, we don't need to
make any assertion about the message.
2013-04-27 14:50:35 -05:00
Jack Nagel
9b5cb6cfb6
Allow brew versions
to work with underspecified formulae
2013-04-27 14:44:48 -05:00
Mike McQuaid
17667c03d0
Add deps target to tests Rakefile for needed gems.
2013-04-26 22:32:26 +01:00
Jack Nagel
b7066b6e74
Add a couple more version tests
2013-04-24 15:02:05 -05:00
Jack Nagel
be32a3ee88
Split up big version detection test
2013-04-24 15:01:54 -05:00
Jack Nagel
3a0726406b
Add tests for FormulaPin and simplify implementation
2013-04-16 01:58:11 -05:00
Jack Nagel
d504d50dcb
Don't create MacOS.version multiple times
2013-04-15 16:04:35 -05:00
Jack Nagel
c8f2d41fe4
Remove extra require
2013-04-13 20:07:14 -05:00
Jack Nagel
5fc772b8e9
Use assert_operator
2013-04-13 19:50:02 -05:00
Jack Nagel
e5eaa6696c
Remove obsolete tests
...
This behavior is now tested at more appropriate levels in
test_software_spec, test_formula_spec_selection, and
test_formula_validation.
2013-04-13 18:23:06 -05:00
Jack Nagel
00bcc5e8ad
Make a specific assertion in this test
2013-04-13 17:40:14 -05:00
Jack Nagel
a05bb48807
Raise a useful exception for incomplete formulae
2013-04-13 17:40:14 -05:00
Jack Nagel
25c0ecfd63
Add tests for formula spec selection
...
These tests document the relative precedence of the stable, bottle,
devel, and head specifications, and the conditions that can influence
which is selected (e.g. command-line flags).
2013-04-13 17:40:13 -05:00
Jack Nagel
4bd34c9624
Allow "devel-only" formulae
...
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-13 17:40:13 -05:00
Jack Nagel
2e26afe556
Improved formula attribute validation
...
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-13 17:40:12 -05:00
Jack Nagel
eb16d746d7
Clean up checksum verification tests
2013-04-13 16:36:30 -05:00
Jack Nagel
909ac74644
Eliminate test_bucket
...
Most of the behavior tested here is now tested elsewhere. Move the
remaining useful tests to better places.
2013-04-10 22:27:56 -05:00
Jack Nagel
d526d2b257
More comprehensive tests for Pathname extension
2013-04-10 20:05:43 -05:00
Jack Nagel
47282db255
Make test formulae initializers more flexible
2013-04-10 12:02:35 -05:00
Jack Nagel
eadb0f60a8
Move formula equality tests out of test_bucket
2013-04-10 12:02:35 -05:00
Jack Nagel
bd4aaac96b
Check existence rather than rescue exceptions
2013-04-09 19:40:08 -05:00
Jack Nagel
67844c9012
Simplify these tests
2013-04-09 19:40:08 -05:00
Jack Nagel
63aace0e4e
Clean up mirror support test
2013-04-08 19:15:22 -05:00
Jack Nagel
646102c311
Fix argument order in test_comparableset
2013-04-08 18:34:55 -05:00
Jack Nagel
d07defa7c1
Fix specs in TestBall
2013-04-08 17:43:01 -05:00
Jack Nagel
a90259b690
Tests for SoftwareSpec and subclasses
2013-04-08 00:55:44 -05:00
Jack Nagel
ef0e4c259f
Ensure ARGV is cleaned up
2013-04-08 00:27:47 -05:00
Jack Nagel
0497afbe57
Clean up some things in test_bucket
2013-04-07 20:59:52 -05:00
Jack Nagel
c816ad70b6
Simplify tests
2013-04-07 20:59:52 -05:00
Jack Nagel
9013b3a0c9
Define RUBY_PATH for tests
2013-04-07 20:59:52 -05:00
Jack Nagel
34bcb10b54
test_patching: inline test classes
2013-04-07 20:59:51 -05:00
Jack Nagel
bafbd07c9e
Isolate ARGV extension tests
2013-04-07 20:59:51 -05:00
Jack Nagel
a79b7d6e0f
Delete pointless test
2013-04-07 20:59:51 -05:00
Jack Nagel
2288f63197
Tests for AbstractDownloadStrategy
2013-04-07 20:59:50 -05:00
Jack Nagel
349cdab76f
Tests for Checksum class
2013-04-07 20:59:49 -05:00
Jack Nagel
4ebafbf62f
Suppress warnings in test_pathname_install
2013-04-02 15:47:25 -05:00
Jack Nagel
3bceaf8f5e
Add test for differing module and import name
2013-04-02 15:41:51 -05:00
Jack Nagel
5b5361b92e
Fix requires in test_x11_dependency.rb
2013-04-02 15:33:35 -05:00
Jack Nagel
b82ae7067d
Shrink requirements.rb
2013-04-02 15:33:35 -05:00
Jack Nagel
c3d48b5d8a
Don't use "assert_not_nil"
2013-04-02 15:33:34 -05:00