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
OpenJDK reports its version slightly different than Oracle Java, and
this was causing the logic in bin/ruby-build to not detect Java 7 or
higher when OpenJDK was used.
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.
This is to fix the error when installing new gems that have executables
which match existing binstubs in the Rubinius bin directory:
"bundle" from bundler conflicts with PREFIX/gems/bin/bundle
RubyGems is supposed to override the binstub if it detects that the
previous one was also generated by RubyGems for the gem of the same
name, but its detection mechanism gets thrown off by having a double
shebang as a result of our binstubs fixing process.
https://github.com/rubygems/rubygems/blob/v2.2.2/lib/rubygems/installer.rb#L149-L154
This avoids generating binstubs with a double shebang.