Commit graph

5 commits

Author SHA1 Message Date
Mislav Marohnić
cde170b581
Suggest rbenv global if there is no explicit global setting (#2052)
Upon installing their first Ruby version on the system, the user may want to set it as their default; otherwise the default will remain "system" and any `gem install` attempts will fail with a permission error.

This suggestion is skipped if the user already has chosen an explicit default, even if it's "system".
2022-09-25 11:20:43 +02:00
Jason Karns
21494ba359 Remove suite-wide setup
Bats doesn't support both suite-wide setup (in helper) *and* file-wide
setup. Which means the existance of any file-level setup() function
overwrites any setup() function from test_helper. This can be confusing,
and (IMO) easier to simply avoid the overwriting and remove any
_implied_ suite-wide setup function from test_helper.

This turns out to not be so bad for the recently added setup function,
because the only test files that actually need aria2c removed from PATH
are those that actually invoke curl. These can be found because they are
the only test files that stub curl; half of which already had
file-specific setup() functions. So the only ones which need a
file-local setup() function added were: checksum.bats and mirror.bats

Along these lines, rbenv.bats and hooks.bats were removing aria2c from
PATH but don't actually need to. (curl isn't stubbed in these tests so
the existance of aria2c wouldn't affect the tests)

Lastly, fixed a tab/spaces whitespace mixup that was introduced by:
750c086d11
2016-08-13 15:53:04 -04:00
Yamashita, Yuu
2d2eef7012 Remove aria2c from PATH to use curl stub during test 2016-06-10 05:09:55 +00:00
Jason Karns
84b49768b9 Add refute test helper 2016-01-20 10:43:46 -05:00
Mislav Marohnić
eae699d642 Add tests for rbenv install/uninstall hooks 2014-01-05 18:59:23 +01:00