This repository has been archived by the owner on Mar 1, 2019. It is now read-only.
forked from cucumber/aruba
-
Notifications
You must be signed in to change notification settings - Fork 1
/
home_directory.feature
80 lines (70 loc) · 2.2 KB
/
home_directory.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Feature: Configure the home directory to be used with aruba
As a developer
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
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.
Background:
Given I use the fixture "cli-app"
Scenario: Default value
Given a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
end
"""
When I successfully run `cucumber`
Then the output should contain:
"""
The default value is "/home/
"""
Scenario: Set to current working directory
Given a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
# use current working directory
config.home_directory = '.'
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should contain:
"""
The default value is "."
"""
Scenario: Set to aruba's working directory
Given a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
# Use aruba working directory
config.home_directory = File.join(config.root_directory, config.working_directory)
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should contain:
"""
The default value is "/home/
"""
Scenario: Set to some other path (deprecated)
Given a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
# use current working directory
config.home_directory = '/tmp/home'
end
Aruba.configure do |config|
puts %(The default value is "#{config.home_directory}")
end
"""
Then I successfully run `cucumber`
Then the output should contain:
"""
The default value is "/tmp/home"
"""