11 Commits

Author SHA1 Message Date
Mike McQuaid
cb3a47d9e2 Fix brew tests on High Sierra.
The `brew test` tests were failing as they were unable to include
`test/unit/assertions`. This is because it's a gem and we were setting
the `GEM_HOME` so system gems were being ignored.

While I was there and examining the `$LOAD_PATH`: reduce the number of
things we add there by using `Bundler.with_clean_env` and only adding
`HOMEBREW_LIBRARY_PATH` in the `$LOAD_PATH` if it isn't already there
(which it always is [and has to be] for integration tests).

This also seems to have the side effect of speeding up integration
tests from 1m26s to 1m8s on my machine.
2017-07-07 15:20:19 +01:00
Mike McQuaid
57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e7ebec633f8bfefc8a396d944edf908, reversing
changes made to 6edf9382bcc1240ad6f97c8b752cfe56cef9965d.
2017-05-07 17:28:39 +01:00
Mike McQuaid
ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Mike McQuaid
d02b4f321d Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
Markus Reiter
b24dc2268a Move brew cask --version into separate file. 2017-03-08 15:49:37 +01:00
Markus Reiter
9fc6c7b2be Move Cask specs into brew tests. 2017-03-05 23:08:14 +01:00
Markus Reiter
487294f815 Remove Minitest. 2017-02-28 22:48:57 +01:00
Markus Reiter
83c1b39946 Use around hook for shared "integration test" context. 2017-02-27 16:36:02 +01:00
Markus Reiter
ec0f2187a2 Avoid warnings when HOMEBREW_PREFIX/bin is not in PATH. 2017-02-25 09:08:05 +01:00
Markus Reiter
9dda84ad6b Add integration test helper methods. 2017-02-23 09:23:22 +01:00
Markus Reiter
8bb46baebb Add RSpec support for integration commands. 2017-02-21 20:23:47 +01:00