1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/producer/core/testing/cucumber/recipe_steps.rb', line 1
def run_recipe remote: false, options: nil, check: false, rargv: nil, wait: true
command = $_baf[:program] + %w[recipe.rb]
case remote
when :unknown then command += %w[-t unknown_host.test]
when true then command += %w[-t some_host.test]
end
command += options if options
command += %w[--] + rargv if rargv
env_allow = Baf::Testing::ENV_WHITELIST + $_baf[:env_allow]
$_baf[:process] = Baf::Testing.run command, env_allow: env_allow, wait: wait
Baf::Testing.expect_ex $_baf[:process], 0 if check
expect($_baf[:process].output).to match /\ASocketError/ if remote == :unknown
end
|