Commit graph

33 commits

Author SHA1 Message Date
Mislav Marohnić
b80edb1889
💅 Tidy up ruby-build help output 2023-11-07 18:20:59 +01:00
Mislav Marohnić
1c8689b950
Add tests for extra configure flags on the command-line 2023-10-11 18:02:07 +02:00
Mislav Marohnić
4079aa75cd
add stub_repeated test helper 2023-03-06 19:15:49 +01:00
Masato Ohba
46878c9646
Remove brew update instruction (#2151)
because `brew update` runs automatically on `brew upgrade` by default since long time ago.
2023-02-20 16:00:59 +01:00
Mislav Marohnić
7de903c560
Fix rbenv install --list exit status 2022-10-03 13:28:58 +02:00
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
Koichiro Iwao
e2b65f5dd5 Merge branch 'master' into list-exclude-eol 2020-04-27 11:20:31 +09:00
Koichiro Iwao
abaebf3ea1
Fix CI 2020-03-03 15:44:02 +09:00
Koichiro Iwao
f9aae4e6ff
Fix CI 2020-02-19 11:13:35 +09:00
eladeyal-intel
1e94192659 shorter git command chains 2020-01-31 17:23:02 +02:00
Koichiro Iwao
4577be8fac
Fix CI: Add --list-exclude-eol option to test 2020-01-30 15:36:26 +09:00
Mislav Marohnić
fe5986d649 Fix rbenv install --list test 2019-11-04 14:48:46 +01: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
Jason Karns
29a987c9fb Include --version in completions 2016-01-18 12:12:09 -05:00
Jason Karns
273dab13b3 include flags in nodenv-install completions 2015-12-04 16:44:36 -05:00
Tester
5013fa8b40 use head instead of function w/ sed 2015-06-03 00:19:41 -04:00
Tester
1f4843da56 just mock invocation, not output 2015-06-02 15:42:18 -04:00
Tester
9b240932b9 remove assertions of mocked output 2015-06-02 15:41:12 -04:00
Tester
ddb12e2e8b find bin dir relative to bats test dir 2015-06-02 15:40:13 -04:00
Tester
85a01065d1 assert that rbenv-install/uninstall scripts have usage section preface 2015-06-02 14:53:04 -04:00
Tester
f2f77388ff make the rbenv-help stub strictly match args 2015-06-02 10:11:36 -04:00
Tester
a102309067 fix tests
stub rbenv-help for rbenv-install and rbenv-uninstall help messages
2015-06-02 09:59:13 -04:00
Simon Hürlimann (CyT)
f2a43c5554 Add 'cd -' to proposed steps to upgrade ruby-build
When a target is not found, rbenv-install proposes pulling changes from
upstream. This involves changing the directory to the ruby-build checkout.

This patch adds a '&& cd -' to change the working directory back to where
we've been. Should work on at least Bash and Zsh.
2015-04-14 00:03:00 +02:00
Mislav Marohnić
34246f9f2e Have rbenv-uninstall respect -h|--help 2014-11-26 20:46:44 -08:00
Mislav Marohnić
96d9cbe77c Move rbenv-install/uninstall tests to rbenv.bats 2014-11-26 20:46:44 -08:00
Mislav Marohnić
aa4a237f79 Show specific upgrade instructions based on environment
Because ruby-build is both a Homebrew formula and an rbenv plugin, some
people end up with both installed. In these cases, executing
`rbenv install` vs. `ruby-build` might not use the same install. Users
end up being unsure where `rbenv install` is coming from and upgrading
it from the wrong location.

This detect whether ruby-build is contained in Homebrew or git and shows
upgrade instructions accordingly. Example:

    See all available versions with \`rbenv install --list'.

    If the version you need is missing, try upgrading ruby-build:

      brew update && brew upgrade ruby-build
2014-09-08 22:23:23 -07:00
Mislav Marohnić
56c8f296ce rbenv install completion includes definitions from plugins
Before, `ruby-build --definitions` was invoked sooner than
RUBY_BUILD_DEFINITIONS was built up with paths from rbenv plugins.
2014-09-08 20:14:33 -07:00
Mislav Marohnić
311d96f779 Fix rbenv install --list for definitions auto-discovery
The build definitions auto-discovered from rbenv plugins would
previously not appear in `--list` results due to discovery process
taking place too late.
2014-09-06 02:57:19 -07:00
Mislav Marohnić
f8015da306 Fix output assertion
`assert_success` doesn't accept an argument via stdin
2014-09-06 02:56:39 -07:00
Mislav Marohnić
78bc84660b Auto-discovery of build definitions from rbenv plugins
The `share/ruby-build/` directory from each rbenv plugin, if it exists,
is added to RUBY_BUILD_DEFINITIONS automatically during `rbenv install`.
2014-08-18 16:08:06 -07:00
Mislav Marohnić
6847c47274 Add rbenv-install tests 2014-08-18 16:08:06 -07:00