blob: 4d94276df9743b31b51a376714188cfa6441937a [file] [log] [blame]
Jakub Josef25c0ea52017-04-27 17:46:27 +02001package com.mirantis.mk
2
3/**
4 * Ruby functions
5 */
6
7def ensureRubyEnv(rubyVersion="2.4.0"){
8 sh """rbenv install ${rubyVersion};
9 rbenv local ${rubyVersion};
10 rbenv exec gem update --system"""
11}
12def installKitchen(){
13 sh """rbenv exec gem install bundler;
14 rbenv exec gem install test-kitchen"""
15}
16
17def runKitchenTests(){
18 runKitchenCommand("converge")
19 runKitchenCommand("verify -t tests/integration")
20}
21
22
23def runKitchenCommand(cmd){
24 sh "rbenv exec bundler exec kitchen ${cmd}"
25}
26
27
28