Markus Reiter
b765853969
Use constant array of constants in Homebrew::TestCase
.
2017-02-03 17:27:36 +01:00
Markus Reiter
f35c6c8cf1
Don’t use before_setup
and after_teardown
.
2017-02-03 17:27:36 +01:00
Markus Reiter
e40c63f77c
Use array of constants to set up test directories.
2017-02-03 17:27:36 +01:00
Alyssa Ross
ade8128a18
formulary: handle ScriptError in formula
...
I added a new `FormulaUnreadableError` subclass of
`FormulaUnavailableError` so existing `rescue`s of
`FormulaUnavailableError` handle this as well.
The new subclass will output the name of the formula with the error
(because this isn't always obvious from the original exception message)
followed by the original error message.
Fixes #1927 .
2017-02-01 18:34:20 +00:00
Xu Cheng
f3df412e77
cleanup: consider version_scheme
...
`brew cleanup` should cleanup formulae which have the older
version scheme.
2017-01-30 17:16:56 +08:00
Markus Reiter
6215c6a5e1
Don’t use assert_nil
in tab_test
.
2017-01-30 00:18:52 +01:00
Mike McQuaid
0fc4a52c6c
*_test: use assert_nil when appropriate.
...
This is warned by the newer MiniTest.
2017-01-26 12:02:17 +00:00
Mike McQuaid
b5f1db5f29
*/Gemfile*: remove rake, version pins, master simplecov.
...
We’re upgrading SimpleCov to 0.13.0 so let’s update the rest of our
gems while we’re at it.
2017-01-26 12:01:24 +00:00
Markus Reiter
f717831a03
Move Cask fixtures to test/support/fixtures
.
2017-01-25 13:33:12 +01:00
Alyssa Ross
5480a84114
tests: give e
helper in UtilTests a better name
2017-01-24 11:25:26 +00:00
Alyssa Ross
65dde58057
tests: add some emoji tests 💯
2017-01-24 11:25:24 +00:00
Alyssa Ross
62a0c3a6f5
tests: remove env helper
2017-01-23 13:39:33 +00:00
Markus Reiter
7d131de57d
tests: slightly stricter match in tab test
...
Suggested by @reitermarkus in
https://github.com/Homebrew/brew/pull/1890#discussion_r97234536 , and
then I added the \A and \Z.
2017-01-23 12:31:02 +00:00
Alyssa Ross
19e61355b3
tests: remove with_git_env method
...
A common git environment is now used in all tests, so this is no longer
required.
2017-01-22 20:54:37 +00:00
Alyssa Ross
b53ce62ffb
tests: use more recent git committer date
...
This will allow the `brew bundle` test to use the default git
environment.
2017-01-22 20:45:15 +00:00
Alyssa Ross
9c3d01c682
tests: remove unnecessary comment
...
See https://github.com/Homebrew/brew/pull/1890#discussion_r97229473 .
2017-01-22 19:59:13 +00:00
Markus Reiter
cbc9e5dd3b
tests: re-use with_environment in using_git_env
...
Proposed by @reitermarkus in
https://github.com/Homebrew/brew/pull/1890#discussion_r97210285 .
I made one slight adjustment of preserving the previous date string in
case anything was relying on it.
2017-01-22 19:53:58 +00:00
Alyssa Ross
1e1de8c111
tests: remove remainder of ARGV stubs
...
I was waiting for confirmation that there wasn't a good reason for these
to be stubbed before I removed them.
2017-01-22 19:53:58 +00:00
Alyssa Ross
a736c7e317
tests: set verbose in ENV instead of stubbing ARGV
2017-01-22 19:53:58 +00:00
Alyssa Ross
0c1d665568
tests: set developer in ENV rather than stubbing
2017-01-22 19:53:58 +00:00
Alyssa Ross
116ed3ec80
tests: automatically restore ENV in teardown
2017-01-22 19:53:58 +00:00
Alyssa Ross
6e0f1366b0
tests: extract a common using_git_env method
2017-01-22 19:52:34 +00:00
Alyssa Ross
6861451f87
tests: remove more per-test file system cleanup
...
These locations are now all automatically cleaned up after every test.
2017-01-22 11:15:18 +00:00
Alyssa Ross
1aee7c6945
tests: remove explicit tmpdir deletions
...
These are no longer necessary.
2017-01-22 11:15:18 +00:00
Alyssa Ross
d7b8420aaa
tests: clean up file system for all tests
...
(No longer just integration tests.)
2017-01-22 11:15:18 +00:00
Alyssa Ross
d86342a251
tests: reset ARGV in teardown
2017-01-21 15:08:20 +00:00
Alyssa Ross
2d550b5008
tests: clear tab cache in global teardown
2017-01-21 14:24:19 +00:00
Alyssa Ross
70a381a00f
tests: enforce super
in lifecycle hooks
...
This will allow us to have global setup and teardown for tests.
For example, we can automatically clear caches after each test, to avoid
annoying intermittent failures like #1879 and #1886 .
2017-01-21 11:34:52 +00:00
Alyssa Ross
366ee0b267
tests: revert modification to ARGV at end of test
...
Similar to 6fc1747e0550545b4fe80f5a1854d16dd2b08afe. I hadn't seen any
test failures caused by this, but I noticed it in the process of
trackign that down and it's an accident waiting to happen.
2017-01-19 13:21:39 +00:00
Alyssa Ross
6fc1747e05
tests: add a missing Tab cache clear
...
This was responsible for the sporadic failures I encountered in #1878 .
2017-01-19 13:16:08 +00:00
Mike McQuaid
4d2201b8be
integration_command_test_case: improve fail output
...
Instead of `puts`ing when the failure occurs save it until the error
message and print a prose description of what the failure was and the
output from the command. This makes the output from failing tests
significantly easier to read.
2017-01-18 08:36:36 +00:00
Mike McQuaid
ffa5ebde53
Merge pull request #1863 from alyssais/uses_ignore_untapped
...
uses: properly handle untapped formulae in recursive dependency expansion (again!)
2017-01-17 19:58:52 +00:00
Mike McQuaid
3d37e3b67f
Merge pull request #1849 from alyssais/requirement_tests
...
tests: test Formula#recursive_requirements
2017-01-17 09:12:47 +00:00
Alyssa Ross
0b216798bb
Revert "Revert "uses: properly handle untapped fo…
...
…rmulae in recursive dependency expansion""
This reverts commit dc9819b86c60b5c6fd10373ff318d8ef60f97d52.
2017-01-16 23:28:26 +00:00
Alyssa Ross
33b955a3f2
tests: fix style of recursive_requirements tests
2017-01-16 21:58:59 +00:00
Mike McQuaid
133e59724a
Merge pull request #1763 from minamijoyo/add-feature-github-release-download-strategy
...
New feature: Allow download from private GitHub repository
2017-01-16 18:52:47 +00:00
Alyssa Ross
0d9020838f
tests: test Formula#recursive_requirements
2017-01-15 19:50:07 +00:00
Masayuki Morita
12b9cb7f4c
Fix rubocop style warning of download_strategy
2017-01-08 18:29:20 +09:00
Masayuki Morita
560d5bdd71
Validate a token when initializing GitHubPrivateRepositoryDownloadStrategy
2017-01-08 18:06:57 +09:00
Masayuki Morita
335be35acf
Generalize GitHubReleaseDownloadStrategy in order to support archive URL
2017-01-08 16:44:54 +09:00
Mike McQuaid
dc9819b86c
Revert "uses: properly handle untapped formulae in recursive dependency expansion"
2017-01-07 13:15:18 +00:00
Alyssa Ross
4c061fc183
dependency: TapDependency#tap returns a Tap
...
Previously, this returned a String, but a Tap instance seems much more
sensible.
I couldn't find anywhere this method was actually used, so the change
shouldn't break anything.
2017-01-05 00:22:56 +00:00
Alyssa Ross
56d6695bf3
tab: set homebrew_version in Tab.empty
2017-01-04 00:56:06 +00:00
Alyssa Ross
b7e10ba239
tests: remove temp tab homebrew_version override
...
This had to be added in #1750 to work around special-casing for tabs
generated with Homebrew versions < 1.1.6. Now that 1.1.6 is the current
version, we can remove this hack.
2017-01-04 00:46:44 +00:00
Mike McQuaid
cd1579a51a
Deprecate Homebrew/versions, Homebrew/devel-only.
...
Don't use Homebrew/versions in a test and remove them both from the
OFFICIAL_TAPS list (i.e. `brew search`).
2017-01-03 17:50:09 +00:00
Masayuki Morita
a4330f458a
Use util/github insted of open-uri in GitHubReleaseDownloadStrategy
2017-01-03 15:12:53 +09:00
Masayuki Morita
b9cc52db45
New feature: GitHubReleaseDownloadStrategy
...
GitHubReleaseDownloadStrategy downloads tarballs from GitHub Release assets.
To use it, add ":using => GitHubReleaseDownloadStrategy" to the URL section
of your formula. This download strategy uses GitHub access tokens (in the
environment variables GITHUB_TOKEN) to sign the request.
This strategy is suitable for corporate use just like S3DownloadStrategy,
because it lets you use a private GttHub repository for internal distribution.
It works with public one, but in that case simply use CurlDownloadStrategy.
2017-01-02 15:56:55 +09:00
Alyssa Ross
e1d7d44e5a
tests: optlink fake kegs in uninstall test
2017-01-01 14:27:24 +00:00
Alyssa Ross
e4856143a6
keg: check installed dependencies iff optlinked
2017-01-01 14:27:24 +00:00
Alyssa Ross
94ead55772
keg: keg_only kegs can have installed dependents
2017-01-01 14:26:28 +00:00