Add tests for 5.9.1 compatibility

cf. issue #35
This commit is contained in:
Raphael Reitzig 2020-12-14 02:07:25 +01:00
parent 9b563135ed
commit 193189ed91
4 changed files with 50 additions and 11 deletions

View file

@ -1,3 +1,5 @@
require 'fileutils'
$index_updated = false # TODO: Hack since Cucumber doesn't have Feature-level hooks
Given(/^SDKMAN! candidate list is up to date$/) do
unless $index_updated
@ -39,6 +41,11 @@ When(/^candidate (\w+) is uninstalled$/) do |candidate|
puts `ls ~/.sdkman/candidates/#{candidate}`
end
Given(/^file ([a-zA-Z0-9-_.\/]+) exists with content/) do |filename,content|
FileUtils.mkdir_p(File.dirname(filename))
File.write(filename, content)
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: