1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/producer/core/testing/cucumber/recipe_steps.rb', line 1
def run_recipe remote: false, options: nil, check: false, rargv: nil
command = %w[producer 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 << ['--', *rargv] if rargv
with_environment 'HOME' => expand_path('.') do
run_simple command.join(' '), false
end
assert_exit_status 0 if check
assert_matching_output '\ASocketError', all_output if remote == :unknown
end
|