Skip to content

Commit

Permalink
Improve home_directory cukes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Jan 30, 2020
1 parent e15f894 commit da78743
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions features/02_configure_aruba/home_directory.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Configure the home directory to be used with aruba
I want to configure the home directory
In order to have a better isolation of tests

Be careful to set the HOME-variable aka `config.home_directory` to something
Be careful when you set the HOME-variable aka `config.home_directory` to something
else than `<project_root>/tmp/aruba`. This is a dance with the devil and
violates the isolation of your test suite. Thus will be not supported from
aruba as of 1.0.0.
Expand Down Expand Up @@ -34,31 +34,33 @@ Feature: Configure the home directory to be used with aruba
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
puts %(The value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should contain:
"""
The default value is "."
The value is "."
"""

Scenario: Set to aruba's working directory
Scenario: Set a path inside aruba's working directory
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
# Use aruba working directory
config.home_directory = File.join(config.root_directory, config.working_directory)
config.home_directory = File.join(config.root_directory,
config.working_directory,
"home")
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
puts %(The value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should match:
"""
The default value is "/.*/tmp/aruba"
The value is "/.*/tmp/aruba/home"
"""

Scenario: Set to some other path (deprecated)
Expand All @@ -70,11 +72,11 @@ Feature: Configure the home directory to be used with aruba
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
puts %(The value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should contain:
"""
The default value is "/tmp/home"
The value is "/tmp/home"
"""

0 comments on commit da78743

Please sign in to comment.