66 Commits

Author SHA1 Message Date
Jack Nagel
b4fd54ae92 Close duped output streams before returning 2014-07-06 15:03:38 -05:00
Jack Nagel
7d8a901f7a Add assert_eql to provide better failure messages for eql? tests 2014-07-03 16:55:13 -05:00
Jack Nagel
acf76f3f55 Add module for logging filesystem leaks in tests 2014-06-23 23:28:25 -05:00
Jack Nagel
5ab65d0b25 Make the test tmpdir a constant 2014-06-23 23:24:45 -05:00
Jack Nagel
f9fd3f46d4 Explicitly create top-level directories for tests 2014-06-23 22:11:39 -05:00
Jack Nagel
04f504546c Give the temporary test directory a prefix 2014-06-23 18:58:58 -05:00
Jack Nagel
43cb0b9141 Use Dir.mktmpdir to create temp directory for tests 2014-06-23 18:42:27 -05:00
Jack Nagel
5beaa512e6 Pass the requested spec into the formula instance 2014-06-20 21:32:36 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Jack Nagel
ea203c2aac Combine Homebrew module declarations in testing_env 2014-06-18 21:08:09 -05:00
Jack Nagel
06305e6211 Switch to Minitest 2014-06-18 20:34:09 -05:00
Jack Nagel
89d74ec475 Move test helpers into Homebrew::TestCase 2014-06-18 20:32:51 -05:00
Jack Nagel
982e9239b8 Use a custom test class so we can avoid monkeypatching 2014-06-18 20:32:51 -05:00
Jack Nagel
344f77e179 Don't load unused compat files for tests 2014-06-16 14:32:24 -05:00
Jack Nagel
5ec52ea4da Remove unnecessary require 2014-06-10 22:29:20 -05:00
Jack Nagel
dd1f742854 Remove unnecessary code 2014-06-10 21:50:58 -05:00
Jack Nagel
0505582507 Rename TEST_FOLDER to TEST_DIRECTORY 2014-06-10 21:49:41 -05:00
Jack Nagel
dbe82909a3 Remove ABS__FILE constant from test environment 2014-06-10 21:46:29 -05:00
Jack Nagel
83f2ee5aea Use RbConfig.ruby if it's available 2014-06-09 21:36:36 -05:00
Jack Nagel
13355c76ac Fix formula test helper parameters 2014-06-09 14:46:30 -05:00
Tsukasa OMOTO
d1f15e967b Taps: cleanup regexps around Taps
Closes Homebrew/homebrew#29139.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-14 11:12:51 -05:00
Jack Nagel
d8c15c8fbf The \w character class already includes underscore
Newer versions of Ruby issue a warning for repeated character classes.
2014-05-03 15:03:22 -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
c6bc01ab58 Add TapDependency 2014-02-28 11:16:55 -06:00
Jack Nagel
0f5a80a97b Fix tokenizing openssl style versions
Fixes Homebrew/homebrew#25736.
2014-01-11 20:00:34 -06:00
Jack Nagel
3656f59508 Add HOMEBREW_TEMP to testing environment 2013-12-14 09:47:32 -06:00
Jack Nagel
291cdea687 Extract constants for checkums in tests 2013-12-09 15:57:50 -06:00
Jack Nagel
e67286369e Stop coercing MACOS_VERSION to a float 2013-10-25 17:29:36 -05:00
Jack Nagel
c511d7d2f4 Add OS.mac? and OS.linux? 2013-10-18 12:56:51 -05:00
Mike McQuaid
a6e2245732 git_etc: update based on bottle etc/var changes. 2013-10-10 16:46:47 +01:00
Mike McQuaid
ab20ed0bc2 Optionally use git to keep brew etc versioned.
Still in alpha state.
Handles defaults and merging changes with new versions.
Enable by setting the HOMEBREW_GIT_ETC environment variable.

Closes Homebrew/homebrew#15751.
Closes Homebrew/homebrew#17713.
2013-09-07 13:39:43 +01:00
Amos Wenger
52ace99f14 Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.

The main places the magic constant ':' was being used were:
  - the $PATH environment variable
  - CMAKE-related environment variables
  - pkg-config related environment variables

Closes Homebrew/homebrew#21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
dd9c269c69 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00
Jack Nagel
325db99a3c RbConfig::CONFIG['bindir'] is already a string 2013-07-28 16:43:22 -05:00
Jack Nagel
c4272a25cc Homebrew has an actual license, remove stale comment 2013-06-22 15:01:59 -05:00
Jack Nagel
2e2d922190 Run tests under actual OS version 2013-06-14 19:19:26 -05:00
Jack Nagel
fdaea3189d Check method existence rather than Ruby version 2013-06-11 17:05:44 -05:00
Jack Nagel
80745a97e2 Add Enumerable#group_by 2013-06-08 12:23:14 -05:00
Jack Nagel
b97b013fce Extract attr_rw from Formula for reuse
Closes Homebrew/homebrew#20239.
2013-06-04 11:06:18 -05:00
Jack Nagel
4adecd73b6 tests: extract common formula helper 2013-05-25 17:19:18 -05:00
Jack Nagel
3be67f7252 Reorganize compat 2013-05-10 23:27:28 -05:00
Jack Nagel
9013b3a0c9 Define RUBY_PATH for tests 2013-04-07 20:59:52 -05:00
Jack Nagel
6a58650611 Make testing_env somewhat readable 2013-04-01 15:53:42 -05:00
Jack Nagel
8e530d861b tests: allow setting MACOS_VERSION from the environment
This makes it easy to test things that vary depending on this constant
without editing testing_env.rb.
2013-03-09 17:38:49 -06:00
Jack Nagel
452e79cf68 Allow satisfied? to be specified in a block
Instead of overriding #satisfied?, Requirement subclasses can specify
the condition in a block:

  satisfy do
    some_condition?
  end

The contents of the block are evaluated in the context of the instance,
and so have access to instance variables and instance methods as before.
Additionally, it is wrapped in an ENV.with_build_environment block. This
can be disabled by passing :build_env => false to satisfy:

  satisfy :build_env => false do
    some_condition?
  end
2013-01-21 17:24:12 -06:00
Jack Nagel
1f505af566 tests: add mocha mocking library 2013-01-21 17:14:16 -06:00
Jack Nagel
09b77a7785 Define HOMEBREW_LIBRARY for tests 2013-01-12 17:51:29 -06:00
Jack Nagel
267ffddbd3 tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25 22:09:23 -05:00
Jack Nagel
1027093eae tests: set newly-visible global constants
The changes to error ouput and logging require a few more things to be
visible during installation tests.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-29 12:14:57 -05:00
Jack Nagel
6ebcccdcc5 Make FileUtils extension available globally
Now that we are monkeypatching copy_metadata, we should load our
extension up front for consistency.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 16:22:01 -05:00