399 Commits

Author SHA1 Message Date
Markus Reiter
b9c9f0f687 Move Cask test helpers to test/support. 2017-03-05 19:13:06 +01:00
Markus Reiter
cc4fb35ae4 Move Cask shared_examples to test/support. 2017-03-05 00:57:34 +01:00
Markus Reiter
487294f815 Remove Minitest. 2017-02-28 22:48:57 +01:00
Markus Reiter
a554902380 Add mktmpdir helper method. 2017-02-28 15:06:32 +01:00
Markus Reiter
bb18f52516 Merge pull request #2215 from reitermarkus/spec-integration-test-helper
Use `around` hook for shared "integration test" context.
2017-02-27 17:50:54 +01:00
Markus Reiter
83c1b39946 Use around hook for shared "integration test" context. 2017-02-27 16:36:02 +01:00
Markus Reiter
76acd1e6ee Convert Version test to spec. 2017-02-27 16:27:07 +01:00
Markus Reiter
004e8175c6 Add formula spec helper. 2017-02-25 13:26:50 +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
Markus Reiter
5ec9597810 Convert OS::Mac::Keg test to spec. 2017-02-21 04:52:53 +01:00
Michael Ledin
92fe130cbb Use TEST_TMPDIR in rmdir tests. 2017-02-19 08:02:00 +03:00
Michael Ledin
5c185eaa43 Expand glob patterns. 2017-02-19 08:02:00 +03:00
Markus Reiter
ecb17f4f1d Add test for uninstall before removing artifacts. 2017-02-16 17:46:23 +01:00
Markus Reiter
e70d28cba1 Add test to check if rubocop-cask version is is outdated. 2017-02-12 23:06:35 +01:00
Alyssa Ross
9e97eadccb rubocop: trailing comma in multiline method calls
Discussed in
https://github.com/Homebrew/brew/pull/1987/files#r100693581.

This was originally ommitted because it wasn't compatible with Ruby 1.8.
(See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971).
2017-02-12 15:11:38 +00:00
Markus Reiter
cdcf362fc0 Add spec_helper. 2017-02-11 15:59:54 +01:00
Markus Reiter
9d96a5c512 Use Open3 for integration tests instead of manually forking. 2017-02-11 13:42:11 +01:00
ilovezfs
67bdeb463a Revert "Use Open3 for integration tests instead of manually forking." 2017-02-10 19:28:40 -08:00
Markus Reiter
956daf37a0 Use Open3 for integration tests instead of manually forking. 2017-02-09 17:17:48 +01:00
Markus Reiter
4eef60c6a6 Remove TestCask class. 2017-02-03 21:52:51 +01:00
Markus Reiter
98b6766f4e Require formulary and tap in Homebrew::TestCase. 2017-02-03 17:27:36 +01:00
Markus Reiter
ac92144654 Add comment about FSLeakLogger to Homebrew::TestCase. 2017-02-03 17:27:36 +01:00
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
Markus Reiter
f717831a03 Move Cask fixtures to test/support/fixtures. 2017-01-25 13:33:12 +01:00
Alyssa Ross
62a0c3a6f5 tests: remove env helper 2017-01-23 13:39:33 +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
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
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
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
Alyssa Ross
a69997cab0 tests: include homebrew version in receipt fixture 2016-12-30 16:15:04 +00:00
Joshua Morten
6eb7aa6d4d fix typo 2016-12-13 15:40:31 -08:00
Mike McQuaid
c560c47202 fs_leak_logger: use more permissive mkpath.
This avoids a race condition occurring here.
2016-12-03 15:04:02 +00:00
William Woodruff
d07b9ed7f2
Replace Utils::JSON with corelib JSON calls. 2016-11-20 20:06:25 -05:00
Mike McQuaid
e8d5040141 testbottest: don't use TEST_FIXTURE_DIR.
This isn't defined for formulae.
2016-11-18 14:08:40 +00:00
Markus Reiter
9dc1f8f3cd Require integration_command_test_case in testing_env. 2016-11-16 23:52:38 +01:00
Markus Reiter
9d82acbf30 Separate Homebrew::TestCase from testing_env. 2016-11-16 23:52:38 +01:00
Markus Reiter
7b9fd538fa Move integration_mocks to test/support/helper. 2016-11-16 23:52:38 +01:00
Markus Reiter
4db1317f38 Move all remaining fixtures to test/support/fixtures. 2016-11-16 23:52:38 +01:00