Refactor recipe execution in cucumber features

Mock home directory in `run_recipe' helper, avoid the need to use
@mocked_home_directory in many scenarios.
This commit is contained in:
Thibault Jouan
2015-04-06 08:47:46 +00:00
parent a3e75b0ac6
commit feef44b255
8 changed files with 10 additions and 8 deletions

View File

@@ -7,7 +7,9 @@ def run_recipe(remote: false, options: nil, check: false, rargv: nil)
command << options if options
command << ['--', *rargv] if rargv
run_simple command.join(' '), false
with_env 'HOME' => File.expand_path(current_dir) do
run_simple command.join(' '), false
end
assert_exit_status 0 if check
assert_matching_output '\ASocketError', all_output if remote == :unknown