Expose fake home dir usage with a cucumber tag
This commit is contained in:
parent
9323391161
commit
947df56d6b
@ -12,6 +12,7 @@ Feature: SSH settings
|
|||||||
When I successfully execute the recipe
|
When I successfully execute the recipe
|
||||||
Then the output must contain my current login name
|
Then the output must contain my current login name
|
||||||
|
|
||||||
|
@fake_home
|
||||||
Scenario: uses configured SSH user name for a given host
|
Scenario: uses configured SSH user name for a given host
|
||||||
Given an SSH config with:
|
Given an SSH config with:
|
||||||
"""
|
"""
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# FIXME: current home directory shouldn't be changed here, maybe we should use
|
|
||||||
# a tag for features needing a fake home directory.
|
|
||||||
Given /^an SSH config with:$/ do |config|
|
Given /^an SSH config with:$/ do |config|
|
||||||
ENV['HOME'] = File.expand_path(current_dir)
|
|
||||||
write_file '.ssh/config', config
|
write_file '.ssh/config', config
|
||||||
end
|
end
|
||||||
|
3
features/support/env_fake_home.rb
Normal file
3
features/support/env_fake_home.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Before('@fake_home') do
|
||||||
|
ENV['HOME'] = File.expand_path(current_dir)
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user