19 Commits

Author SHA1 Message Date
Jack Nagel
b40a3413e3 Pass around only absolute paths when dealing with taps 2014-04-25 18:36:31 -05:00
Tsukasa OMOTO
54004a4759 Make the on-disk representation of taps unambiguous
This commit supports "-" and "_" in names of user and repository.

Closes Homebrew/homebrew#28203.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-24 17:10:41 -05:00
Jack Nagel
07b7abdc7a Add some missing test cases for brew update 2013-11-14 11:10:43 -06:00
Jack Nagel
9b51f986c8 Remove duplication in updater tests 2013-07-09 22:12:08 -05:00
phinze
9a94a77fa3 Properly define tapped formulae in update
A tapped formula is a ruby file present:

  - in the root of the tap
  - in directory of the tap called Formula
  - in a directory of the tap called HomebrewFormula

And nowhere else. This corrects an overzealous definition of tapped
formula in the updater. (the correct definition has been in Pathname
since e613cbe5783cea2abb8100b56c22126a1ab6b9f2)

Refs Homebrew/homebrew#19743.
Closes Homebrew/homebrew#21087.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-09 20:52:51 -05:00
Jack Nagel
c8f2d41fe4 Remove extra require 2013-04-13 20:07:14 -05:00
Jack Nagel
0d45c3c0f2 Suppress uninitialized instance variable warnings 2013-03-28 17:37:29 -05:00
Jack Nagel
93f8c71e21 tests: clean up whitespace
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
90dbb8a141 Prune some requires from test files
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-04 22:47:34 -05:00
Jack Nagel
5d84df0210 tests: bring brew update tests up to date
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Jack Nagel
19a0aa51a1 Adjust updater tests for git config calls
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-05 12:35:55 -06:00
Jack Nagel
dec66e951a update: correct failing tests
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.

We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:37:36 -05:00
Jack Nagel
c8d4af5611 update: bring tests up-to-date
The tests for update have been neglected during the last few rounds of
changes, so fix them up.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 00:55:20 -05:00
Mislav Marohnić
8c521ca3d0 refactor update command to use git diff instead of parsing pull output
This fixes reporting of which formulae changed in git versions where `pull`
output is not compatible.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:39 -07:00
Mislav Marohnić
5fdb145e76 enable updater tests to be run on their own
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:33 -07:00
Max Howell
768910283a Refactor the brew command into one file per command
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.
2011-03-12 11:55:02 -08:00
David Porter
4da905b7fb Fix the update tests
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-05-12 09:20:15 -07:00
Adam Vandenberg
9d127ac3d5 Move updater tests to separate file. 2010-04-06 08:27:10 -07:00
Adam Vandenberg
a309403d8a Update test suite.
* Break single test case class into several test cases.
* Fix broken arch test.
* Make update tests optional (seem to only work for mxcl).
* Add more tests.
* Move fixtures to separate folder.
2010-02-02 09:08:10 -08:00