mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 21:27:11 -07:00
parent
9b563135ed
commit
193189ed91
4 changed files with 50 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue