mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 13:27:10 -07:00
Test for autoenv
setting
This commit is contained in:
parent
7b17fcc4b7
commit
61f1cf8efc
7 changed files with 154 additions and 12 deletions
17
test/features/support/hooks.rb
Normal file
17
test/features/support/hooks.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require_relative '../step_definitions/setup'
|
||||
|
||||
After do |scenario|
|
||||
_restore_config
|
||||
end
|
||||
|
||||
# Uninstall all SDKMAN! candidates
|
||||
# TODO: Run after every scenario, this makes tests very slow.
|
||||
# Currently, Cucumber doesn't have Feature-level hooks, so we have to work around:
|
||||
# --> install only if not already installed;
|
||||
# if the test needs a candidate to _not_ be there, make it explicit.
|
||||
# --> clean up after _all_ features at least
|
||||
at_exit do
|
||||
Dir["#{ENV['HOME']}/.sdkman/candidates/*/*"].each do |candidate_dir|
|
||||
_uninstall_candidate_version(candidate_dir)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue