aruba 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +72 -1
- data/CONTRIBUTING.md +11 -31
- data/README.md +1 -2
- data/exe/aruba +2 -2
- data/lib/aruba.rb +1 -1
- data/lib/aruba/api.rb +11 -12
- data/lib/aruba/api/bundler.rb +18 -3
- data/lib/aruba/api/commands.rb +19 -22
- data/lib/aruba/api/core.rb +65 -48
- data/lib/aruba/api/environment.rb +13 -5
- data/lib/aruba/api/filesystem.rb +69 -39
- data/lib/aruba/api/text.rb +15 -3
- data/lib/aruba/aruba_path.rb +3 -4
- data/lib/aruba/basic_configuration.rb +52 -71
- data/lib/aruba/basic_configuration/option.rb +2 -2
- data/lib/aruba/cli.rb +9 -6
- data/lib/aruba/command.rb +4 -4
- data/lib/aruba/config/jruby.rb +9 -9
- data/lib/aruba/config_wrapper.rb +17 -2
- data/lib/aruba/configuration.rb +37 -32
- data/lib/aruba/console.rb +11 -13
- data/lib/aruba/console/help.rb +9 -6
- data/lib/aruba/contracts/absolute_path.rb +2 -2
- data/lib/aruba/contracts/enum.rb +1 -1
- data/lib/aruba/contracts/is_power_of_two.rb +3 -3
- data/lib/aruba/contracts/relative_path.rb +2 -2
- data/lib/aruba/cucumber.rb +7 -7
- data/lib/aruba/cucumber/command.rb +106 -95
- data/lib/aruba/cucumber/environment.rb +7 -7
- data/lib/aruba/cucumber/file.rb +50 -26
- data/lib/aruba/cucumber/hooks.rb +32 -29
- data/lib/aruba/cucumber/testing_frameworks.rb +32 -30
- data/lib/aruba/event_bus.rb +6 -4
- data/lib/aruba/event_bus/name_resolver.rb +12 -11
- data/lib/aruba/events.rb +2 -1
- data/lib/aruba/file_size.rb +1 -1
- data/lib/aruba/generators/script_file.rb +2 -2
- data/lib/aruba/hooks.rb +2 -4
- data/lib/aruba/in_config_wrapper.rb +8 -5
- data/lib/aruba/initializer.rb +14 -12
- data/lib/aruba/matchers/base/base_matcher.rb +3 -12
- data/lib/aruba/matchers/base/message_indenter.rb +2 -2
- data/lib/aruba/matchers/base/object_formatter.rb +2 -5
- data/lib/aruba/matchers/collection.rb +1 -1
- data/lib/aruba/matchers/collection/all.rb +1 -1
- data/lib/aruba/matchers/collection/include_an_object.rb +6 -6
- data/lib/aruba/matchers/command.rb +1 -1
- data/lib/aruba/matchers/command/be_successfully_executed.rb +6 -4
- data/lib/aruba/matchers/command/have_exit_status.rb +3 -1
- data/lib/aruba/matchers/command/have_finished_in_time.rb +4 -2
- data/lib/aruba/matchers/command/have_output.rb +4 -2
- data/lib/aruba/matchers/command/have_output_on_stderr.rb +3 -1
- data/lib/aruba/matchers/command/have_output_on_stdout.rb +3 -1
- data/lib/aruba/matchers/directory.rb +1 -1
- data/lib/aruba/matchers/directory/be_an_existing_directory.rb +2 -2
- data/lib/aruba/matchers/directory/have_sub_directory.rb +9 -4
- data/lib/aruba/matchers/environment.rb +1 -1
- data/lib/aruba/matchers/file.rb +1 -1
- data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +1 -1
- data/lib/aruba/matchers/file/be_an_existing_executable.rb +2 -2
- data/lib/aruba/matchers/file/be_an_existing_file.rb +2 -2
- data/lib/aruba/matchers/file/have_file_content.rb +1 -1
- data/lib/aruba/matchers/file/have_file_size.rb +5 -3
- data/lib/aruba/matchers/file/have_same_file_content.rb +2 -2
- data/lib/aruba/matchers/path.rb +1 -1
- data/lib/aruba/matchers/path/a_path_matching_pattern.rb +1 -1
- data/lib/aruba/matchers/path/be_an_absolute_path.rb +1 -1
- data/lib/aruba/matchers/path/be_an_existing_path.rb +1 -1
- data/lib/aruba/matchers/path/have_permissions.rb +9 -6
- data/lib/aruba/matchers/string.rb +1 -1
- data/lib/aruba/matchers/string/include_output_string.rb +1 -1
- data/lib/aruba/matchers/string/match_output_string.rb +1 -1
- data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
- data/lib/aruba/platform.rb +2 -2
- data/lib/aruba/platforms/announcer.rb +29 -17
- data/lib/aruba/platforms/aruba_file_creator.rb +3 -1
- data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +7 -2
- data/lib/aruba/platforms/aruba_logger.rb +11 -10
- data/lib/aruba/platforms/command_monitor.rb +7 -9
- data/lib/aruba/platforms/determine_disk_usage.rb +2 -4
- data/lib/aruba/platforms/filesystem_status.rb +20 -14
- data/lib/aruba/platforms/simple_table.rb +3 -3
- data/lib/aruba/platforms/unix_command_string.rb +2 -2
- data/lib/aruba/platforms/unix_environment_variables.rb +2 -4
- data/lib/aruba/platforms/unix_platform.rb +23 -23
- data/lib/aruba/platforms/unix_which.rb +2 -2
- data/lib/aruba/platforms/windows_command_string.rb +2 -2
- data/lib/aruba/platforms/windows_environment_variables.rb +3 -2
- data/lib/aruba/platforms/windows_platform.rb +7 -7
- data/lib/aruba/platforms/windows_which.rb +8 -4
- data/lib/aruba/processes/basic_process.rb +4 -4
- data/lib/aruba/processes/debug_process.rb +5 -3
- data/lib/aruba/processes/in_process.rb +10 -8
- data/lib/aruba/processes/spawn_process.rb +28 -25
- data/lib/aruba/rspec.rb +30 -20
- data/lib/aruba/runtime.rb +16 -9
- data/lib/aruba/setup.rb +25 -12
- data/lib/aruba/version.rb +1 -1
- metadata +77 -88
- data/.cucumberproignore +0 -3
- data/.document +0 -5
- data/.github/ISSUE_TEMPLATE.md +0 -48
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
- data/.gitignore +0 -38
- data/.rspec +0 -3
- data/.rubocop.yml +0 -31
- data/.rubocop_todo.yml +0 -262
- data/.simplecov +0 -36
- data/.travis.yml +0 -62
- data/.yardopts +0 -11
- data/Dockerfile +0 -67
- data/Gemfile +0 -12
- data/Rakefile +0 -80
- data/TODO.md +0 -13
- data/appveyor.yml +0 -29
- data/aruba.gemspec +0 -54
- data/bin/console +0 -7
- data/bin/test +0 -9
- data/config/.gitignore +0 -1
- data/cucumber.yml +0 -6
- data/docker-compose.yml +0 -26
- data/fixtures/cli-app/.gitignore +0 -9
- data/fixtures/cli-app/.rspec +0 -2
- data/fixtures/cli-app/README.md +0 -39
- data/fixtures/cli-app/Rakefile +0 -1
- data/fixtures/cli-app/bin/aruba-test-cli +0 -6
- data/fixtures/cli-app/cli-app.gemspec +0 -25
- data/fixtures/cli-app/features/support/aruba.rb +0 -1
- data/fixtures/cli-app/features/support/env.rb +0 -1
- data/fixtures/cli-app/lib/cli/app.rb +0 -9
- data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
- data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
- data/fixtures/cli-app/script/console +0 -14
- data/fixtures/cli-app/spec/spec_helper.rb +0 -7
- data/fixtures/cli-app/spec/support/aruba.rb +0 -1
- data/fixtures/copy/file.txt +0 -1
- data/fixtures/empty-app/.gitignore +0 -9
- data/fixtures/empty-app/.rspec +0 -2
- data/fixtures/empty-app/README.md +0 -24
- data/fixtures/empty-app/Rakefile +0 -1
- data/fixtures/empty-app/cli-app.gemspec +0 -25
- data/fixtures/empty-app/lib/cli/app.rb +0 -7
- data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
- data/fixtures/getting-started-app/.gitignore +0 -4
- data/fixtures/getting-started-app/Gemfile +0 -4
- data/fixtures/getting-started-app/README.md +0 -3
- data/fixtures/getting-started-app/features/support/env.rb +0 -1
- data/lib/aruba/extensions/string/strip.rb +0 -25
- data/lib/aruba/tasks/docker_helpers.rb +0 -154
@@ -1,5 +1,5 @@
|
|
1
1
|
Given(/^a mocked home directory$/) do
|
2
|
-
set_environment_variable
|
2
|
+
set_environment_variable "HOME", expand_path(".")
|
3
3
|
end
|
4
4
|
|
5
5
|
Given(/^I set the environment variable "(.*)" to "(.*)"/) do |variable, value|
|
@@ -16,8 +16,8 @@ end
|
|
16
16
|
|
17
17
|
Given(/^I set the environment variables? to:/) do |table|
|
18
18
|
table.hashes.each do |row|
|
19
|
-
variable = row[
|
20
|
-
value = row[
|
19
|
+
variable = row["variable"].to_s
|
20
|
+
value = row["value"].to_s
|
21
21
|
|
22
22
|
set_environment_variable(variable, value)
|
23
23
|
end
|
@@ -25,8 +25,8 @@ end
|
|
25
25
|
|
26
26
|
Given(/^I append the values? to the environment variables?:/) do |table|
|
27
27
|
table.hashes.each do |row|
|
28
|
-
variable = row[
|
29
|
-
value = row[
|
28
|
+
variable = row["variable"].to_s
|
29
|
+
value = row["value"].to_s
|
30
30
|
|
31
31
|
append_environment_variable(variable, value)
|
32
32
|
end
|
@@ -34,8 +34,8 @@ end
|
|
34
34
|
|
35
35
|
Given(/^I prepend the values? to the environment variables?:/) do |table|
|
36
36
|
table.hashes.each do |row|
|
37
|
-
variable = row[
|
38
|
-
value = row[
|
37
|
+
variable = row["variable"].to_s
|
38
|
+
value = row["value"].to_s
|
39
39
|
|
40
40
|
prepend_environment_variable(variable, value)
|
41
41
|
end
|
data/lib/aruba/cucumber/file.rb
CHANGED
@@ -3,11 +3,13 @@ Given(/^I use (?:a|the) fixture(?: named)? "([^"]*)"$/) do |name|
|
|
3
3
|
cd name
|
4
4
|
end
|
5
5
|
|
6
|
-
Given(/^I copy (?:a|the) (?:file|directory)(?: (?:named|from))? "([^"]*)" to "([^"]*)"$/)
|
6
|
+
Given(/^I copy (?:a|the) (?:file|directory)(?: (?:named|from))? "([^"]*)" to "([^"]*)"$/) \
|
7
|
+
do |source, destination|
|
7
8
|
copy source, destination
|
8
9
|
end
|
9
10
|
|
10
|
-
Given(/^I move (?:a|the) (?:file|directory)(?: (?:named|from))? "([^"]*)" to "([^"]*)"$/)
|
11
|
+
Given(/^I move (?:a|the) (?:file|directory)(?: (?:named|from))? "([^"]*)" to "([^"]*)"$/) \
|
12
|
+
do |source, destination|
|
11
13
|
move source, destination
|
12
14
|
end
|
13
15
|
|
@@ -15,7 +17,8 @@ Given(/^(?:a|the|(?:an empty)) directory(?: named)? "([^"]*)"$/) do |dir_name|
|
|
15
17
|
create_directory(dir_name)
|
16
18
|
end
|
17
19
|
|
18
|
-
Given(/^(?:a|the) directory(?: named)? "([^"]*)" with mode "([^"]*)"$/)
|
20
|
+
Given(/^(?:a|the) directory(?: named)? "([^"]*)" with mode "([^"]*)"$/) \
|
21
|
+
do |dir_name, dir_mode|
|
19
22
|
create_directory(dir_name)
|
20
23
|
chmod(dir_mode, dir_name)
|
21
24
|
end
|
@@ -25,14 +28,15 @@ Given(/^(?:a|the) file(?: named)? "([^"]*)" with:$/) do |file_name, file_content
|
|
25
28
|
end
|
26
29
|
|
27
30
|
Given(/^(?:an|the) executable(?: named)? "([^"]*)" with:$/) do |file_name, file_content|
|
28
|
-
step %(a file named "#{file_name}" with mode "
|
31
|
+
step %(a file named "#{file_name}" with mode "0o755" and with:), file_content
|
29
32
|
end
|
30
33
|
|
31
34
|
Given(/^(?:a|the) file(?: named)? "([^"]*)" with "([^"]*)"$/) do |file_name, file_content|
|
32
35
|
write_file(file_name, unescape_text(file_content))
|
33
36
|
end
|
34
37
|
|
35
|
-
Given(/^(?:a|the) file(?: named)? "([^"]*)" with mode "([^"]*)" and with:$/)
|
38
|
+
Given(/^(?:a|the) file(?: named)? "([^"]*)" with mode "([^"]*)" and with:$/) \
|
39
|
+
do |file_name, file_mode, file_content|
|
36
40
|
write_file(file_name, unescape_text(file_content))
|
37
41
|
chmod(file_mode, file_name)
|
38
42
|
end
|
@@ -42,11 +46,12 @@ Given(/^(?:a|the) (\d+) byte file(?: named)? "([^"]*)"$/) do |file_size, file_na
|
|
42
46
|
end
|
43
47
|
|
44
48
|
Given(/^(?:an|the) empty file(?: named)? "([^"]*)"$/) do |file_name|
|
45
|
-
write_file(file_name,
|
49
|
+
write_file(file_name, "")
|
46
50
|
end
|
47
51
|
|
48
|
-
Given(/^(?:an|the) empty file(?: named)? "([^"]*)" with mode "([^"]*)"$/)
|
49
|
-
|
52
|
+
Given(/^(?:an|the) empty file(?: named)? "([^"]*)" with mode "([^"]*)"$/) \
|
53
|
+
do |file_name, file_mode|
|
54
|
+
write_file(file_name, "")
|
50
55
|
chmod(file_mode, file_name)
|
51
56
|
end
|
52
57
|
|
@@ -54,7 +59,8 @@ When(/^I write to "([^"]*)" with:$/) do |file_name, file_content|
|
|
54
59
|
write_file(file_name, file_content)
|
55
60
|
end
|
56
61
|
|
57
|
-
When(/^I overwrite(?: (?:a|the) file(?: named)?)? "([^"]*)" with:$/)
|
62
|
+
When(/^I overwrite(?: (?:a|the) file(?: named)?)? "([^"]*)" with:$/) \
|
63
|
+
do |file_name, file_content|
|
58
64
|
overwrite_file(file_name, file_content)
|
59
65
|
end
|
60
66
|
|
@@ -62,12 +68,17 @@ When(/^I append to "([^"]*)" with:$/) do |file_name, file_content|
|
|
62
68
|
append_to_file(file_name, file_content)
|
63
69
|
end
|
64
70
|
|
71
|
+
When(/^I append the following lines to "([^"]*)":$/) do |file_name, file_content|
|
72
|
+
append_lines_to_file(file_name, file_content)
|
73
|
+
end
|
74
|
+
|
65
75
|
When(/^I append to "([^"]*)" with "([^"]*)"$/) do |file_name, file_content|
|
66
76
|
append_to_file(file_name, file_content)
|
67
77
|
end
|
68
78
|
|
69
|
-
When(/^I remove (?:a|the) (?:file|directory)(?: named)? "([^"]*)"( with full force)?$/)
|
70
|
-
|
79
|
+
When(/^I remove (?:a|the) (?:file|directory)(?: named)? "([^"]*)"( with full force)?$/) \
|
80
|
+
do |name, force_remove|
|
81
|
+
remove(name, force: !force_remove.nil?)
|
71
82
|
end
|
72
83
|
|
73
84
|
Given(/^(?:a|the) (?:file|directory)(?: named)? "([^"]*)" does not exist$/) do |name|
|
@@ -88,7 +99,8 @@ Then(/^the following files should (not )?exist:$/) do |negated, files|
|
|
88
99
|
end
|
89
100
|
end
|
90
101
|
|
91
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?exist(?: anymore)?$/)
|
102
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?exist(?: anymore)?$/) \
|
103
|
+
do |path, expect_match|
|
92
104
|
if expect_match
|
93
105
|
expect(path).not_to be_an_existing_file
|
94
106
|
else
|
@@ -96,7 +108,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?exist(?: anymore)?$/) d
|
|
96
108
|
end
|
97
109
|
end
|
98
110
|
|
99
|
-
Then(/^(?:a|the) directory(?: named)? "([^"]*)" should (not )?exist(?: anymore)?$/)
|
111
|
+
Then(/^(?:a|the) directory(?: named)? "([^"]*)" should (not )?exist(?: anymore)?$/) \
|
112
|
+
do |path, expect_match|
|
100
113
|
if expect_match
|
101
114
|
expect(path).not_to be_an_existing_directory
|
102
115
|
else
|
@@ -112,7 +125,8 @@ Then(/^(?:a|the) file matching %r<(.*?)> should (not )?exist$/) do |pattern, exp
|
|
112
125
|
end
|
113
126
|
end
|
114
127
|
|
115
|
-
Then(/^(?:a|the) (\d+) byte file(?: named)? "([^"]*)" should (not )?exist$/)
|
128
|
+
Then(/^(?:a|the) (\d+) byte file(?: named)? "([^"]*)" should (not )?exist$/) \
|
129
|
+
do |size, file, negated|
|
116
130
|
if negated
|
117
131
|
expect(file).not_to have_file_size(size)
|
118
132
|
else
|
@@ -130,7 +144,8 @@ Then(/^the following directories should (not )?exist:$/) do |negated, directorie
|
|
130
144
|
end
|
131
145
|
end
|
132
146
|
|
133
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain "([^"]*)"$/)
|
147
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain "([^"]*)"$/) \
|
148
|
+
do |file, negated, content|
|
134
149
|
if negated
|
135
150
|
expect(file).not_to have_file_content file_content_including(content.chomp)
|
136
151
|
else
|
@@ -138,7 +153,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain "([^"]*)"$/) do
|
|
138
153
|
end
|
139
154
|
end
|
140
155
|
|
141
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain:$/)
|
156
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain:$/) \
|
157
|
+
do |file, negated, content|
|
142
158
|
if negated
|
143
159
|
expect(file).not_to have_file_content file_content_including(content.chomp)
|
144
160
|
else
|
@@ -146,7 +162,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain:$/) do |file, n
|
|
146
162
|
end
|
147
163
|
end
|
148
164
|
|
149
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain exactly:$/)
|
165
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain exactly:$/) \
|
166
|
+
do |file, negated, content|
|
150
167
|
if negated
|
151
168
|
expect(file).not_to have_file_content content
|
152
169
|
else
|
@@ -154,7 +171,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?contain exactly:$/) do
|
|
154
171
|
end
|
155
172
|
end
|
156
173
|
|
157
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?match %r<([^>]*)>$/)
|
174
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?match %r<([^>]*)>$/) \
|
175
|
+
do |file, negated, content|
|
158
176
|
if negated
|
159
177
|
expect(file).not_to have_file_content file_content_matching(content)
|
160
178
|
else
|
@@ -162,7 +180,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?match %r<([^>]*)>$/) do
|
|
162
180
|
end
|
163
181
|
end
|
164
182
|
|
165
|
-
Then(
|
183
|
+
Then(%r{^(?:a|the) file(?: named)? "([^"]*)" should (not )?match /([^/]*)/$}) \
|
184
|
+
do |file, negated, content|
|
166
185
|
if negated
|
167
186
|
expect(file).not_to have_file_content file_content_matching(content)
|
168
187
|
else
|
@@ -170,7 +189,8 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?match \/([^\/]*)\/$/) d
|
|
170
189
|
end
|
171
190
|
end
|
172
191
|
|
173
|
-
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?be equal to file "([^"]*)"/)
|
192
|
+
Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?be equal to file "([^"]*)"/) \
|
193
|
+
do |file, negated, reference_file|
|
174
194
|
if negated
|
175
195
|
expect(file).not_to have_same_file_content_as(reference_file)
|
176
196
|
else
|
@@ -178,10 +198,14 @@ Then(/^(?:a|the) file(?: named)? "([^"]*)" should (not )?be equal to file "([^"]
|
|
178
198
|
end
|
179
199
|
end
|
180
200
|
|
181
|
-
Then(
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
201
|
+
Then(
|
202
|
+
/^(?:a|the) (?:file|directory)(?: named)? "([^"]*)" should have permissions "([^"]*)"$/
|
203
|
+
) do |path, permissions|
|
204
|
+
expect(path).to have_permissions(permissions)
|
205
|
+
end
|
206
|
+
|
207
|
+
Then(
|
208
|
+
/^(?:a|the) (?:file|directory)(?: named)? "([^"]*)" should not have permissions "([^"]*)"$/
|
209
|
+
) do |path, permissions|
|
210
|
+
expect(path).not_to have_permissions(permissions)
|
187
211
|
end
|
data/lib/aruba/cucumber/hooks.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "aruba/aruba_path"
|
2
|
+
require "aruba/api"
|
3
|
+
require "aruba/platform"
|
4
4
|
World(Aruba::Api)
|
5
5
|
|
6
6
|
Around do |_, block|
|
@@ -9,8 +9,11 @@ end
|
|
9
9
|
|
10
10
|
Before do
|
11
11
|
# ... so every change needs to be done later
|
12
|
-
prepend_environment_variable
|
13
|
-
|
12
|
+
prepend_environment_variable(
|
13
|
+
"PATH",
|
14
|
+
aruba.config.command_search_paths.join(File::PATH_SEPARATOR) + File::PATH_SEPARATOR
|
15
|
+
)
|
16
|
+
set_environment_variable "HOME", aruba.config.home_directory
|
14
17
|
end
|
15
18
|
|
16
19
|
After do
|
@@ -18,68 +21,68 @@ After do
|
|
18
21
|
aruba.command_monitor.clear
|
19
22
|
end
|
20
23
|
|
21
|
-
Before(
|
24
|
+
Before("@no-clobber") do
|
22
25
|
setup_aruba(false)
|
23
26
|
end
|
24
27
|
|
25
|
-
Before(
|
28
|
+
Before("~@no-clobber") do
|
26
29
|
setup_aruba
|
27
30
|
end
|
28
31
|
|
29
|
-
Before(
|
32
|
+
Before("@puts") do
|
30
33
|
aruba.announcer.mode = :puts
|
31
34
|
end
|
32
35
|
|
33
|
-
Before(
|
36
|
+
Before("@announce-command") do
|
34
37
|
aruba.announcer.activate :command
|
35
38
|
end
|
36
39
|
|
37
|
-
Before(
|
40
|
+
Before("@announce-command-content") do
|
38
41
|
aruba.announcer.activate :command_content
|
39
42
|
end
|
40
43
|
|
41
|
-
Before(
|
44
|
+
Before("@announce-command-filesystem-status") do
|
42
45
|
aruba.announcer.activate :command_filesystem_status
|
43
46
|
end
|
44
47
|
|
45
|
-
Before(
|
48
|
+
Before("@announce-output") do
|
46
49
|
aruba.announcer.activate :stdout
|
47
50
|
aruba.announcer.activate :stderr
|
48
51
|
end
|
49
52
|
|
50
|
-
Before(
|
53
|
+
Before("@announce-stdout") do
|
51
54
|
aruba.announcer.activate :stdout
|
52
55
|
end
|
53
56
|
|
54
|
-
Before(
|
57
|
+
Before("@announce-stderr") do
|
55
58
|
aruba.announcer.activate :stderr
|
56
59
|
end
|
57
60
|
|
58
|
-
Before(
|
61
|
+
Before("@announce-directory") do
|
59
62
|
aruba.announcer.activate :directory
|
60
63
|
end
|
61
64
|
|
62
|
-
Before(
|
65
|
+
Before("@announce-stop-signal") do
|
63
66
|
aruba.announcer.activate :stop_signal
|
64
67
|
end
|
65
68
|
|
66
|
-
Before(
|
69
|
+
Before("@announce-full-environment") do
|
67
70
|
aruba.announcer.activate :full_environment
|
68
71
|
end
|
69
72
|
|
70
|
-
Before(
|
73
|
+
Before("@announce-changed-environment") do
|
71
74
|
aruba.announcer.activate :changed_environment
|
72
75
|
end
|
73
76
|
|
74
|
-
Before(
|
77
|
+
Before("@announce-timeout") do
|
75
78
|
aruba.announcer.activate :timeout
|
76
79
|
end
|
77
80
|
|
78
|
-
Before(
|
81
|
+
Before("@announce-wait-time") do
|
79
82
|
aruba.announcer.activate :wait_time
|
80
83
|
end
|
81
84
|
|
82
|
-
Before(
|
85
|
+
Before("@announce") do
|
83
86
|
aruba.announcer.activate :changed_environment
|
84
87
|
aruba.announcer.activate :command
|
85
88
|
aruba.announcer.activate :directory
|
@@ -95,30 +98,30 @@ Before('@announce') do
|
|
95
98
|
aruba.announcer.activate :command_filesystem_status
|
96
99
|
end
|
97
100
|
|
98
|
-
Before(
|
101
|
+
Before("@keep-ansi-escape-sequences") do
|
99
102
|
aruba.config.remove_ansi_escape_sequences = false
|
100
103
|
end
|
101
104
|
|
102
|
-
Before
|
103
|
-
set_environment_variable
|
105
|
+
Before "@mocked-home-directory" do
|
106
|
+
set_environment_variable "HOME", expand_path(".")
|
104
107
|
end
|
105
108
|
|
106
|
-
Before(
|
109
|
+
Before("@disable-bundler") do
|
107
110
|
unset_bundler_env_vars
|
108
111
|
end
|
109
112
|
|
110
|
-
Before(
|
113
|
+
Before("@debug") do
|
111
114
|
aruba.config.command_launcher = :debug
|
112
115
|
end
|
113
116
|
|
114
|
-
Before(
|
117
|
+
Before("@command-launcher-spawn") do
|
115
118
|
aruba.config.command_launcher = :spawn
|
116
119
|
end
|
117
120
|
|
118
|
-
Before(
|
121
|
+
Before("@command-launcher-in-process") do
|
119
122
|
aruba.config.command_launcher = :in_process
|
120
123
|
end
|
121
124
|
|
122
|
-
Before(
|
125
|
+
Before("@command-launcher-debug") do
|
123
126
|
aruba.config.command_launcher = :debug
|
124
127
|
end
|
@@ -1,119 +1,121 @@
|
|
1
1
|
# Cucumber
|
2
|
-
Then
|
2
|
+
Then(/^the feature(?:s)? should not(?: all)? pass$/) do
|
3
3
|
step 'the output should contain " failed)"'
|
4
|
-
step
|
4
|
+
step "the exit status should be 1"
|
5
5
|
end
|
6
6
|
|
7
7
|
# Cucumber
|
8
|
-
Then
|
8
|
+
Then(/^the feature(?:s)? should(?: all)? pass$/) do
|
9
9
|
step 'the output should not contain " failed)"'
|
10
10
|
step 'the output should not contain " undefined)"'
|
11
|
-
step
|
11
|
+
step "the exit status should be 0"
|
12
12
|
end
|
13
13
|
|
14
14
|
# Cucumber
|
15
|
-
Then
|
15
|
+
Then(/^the feature(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
|
16
16
|
step 'the output should contain " failed)"'
|
17
|
-
step
|
17
|
+
step "the exit status should be 1"
|
18
18
|
|
19
19
|
if regex
|
20
20
|
step "the output should match %r<#{string}>"
|
21
21
|
else
|
22
|
-
step
|
22
|
+
step "the output should contain:", string
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
# Cucumber
|
27
|
-
Then
|
27
|
+
Then(/^the feature(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
|
28
28
|
step 'the output should not contain " failed)"'
|
29
29
|
step 'the output should not contain " undefined)"'
|
30
|
-
step
|
30
|
+
step "the exit status should be 0"
|
31
31
|
|
32
32
|
if regex
|
33
33
|
step "the output should match %r<#{string}>"
|
34
34
|
else
|
35
|
-
step
|
35
|
+
step "the output should contain:", string
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
# RSpec
|
40
|
-
Then
|
40
|
+
Then(/^the spec(?:s)? should not(?: all)? pass(?: with (\d+) failures?)?$/) \
|
41
|
+
do |count_failures|
|
41
42
|
if count_failures.nil?
|
42
43
|
step 'the output should not contain "0 failures"'
|
43
44
|
else
|
44
45
|
step %(the output should contain "#{count_failures} failures")
|
45
46
|
end
|
46
47
|
|
47
|
-
step
|
48
|
+
step "the exit status should be 1"
|
48
49
|
end
|
49
50
|
|
50
51
|
# RSpec
|
51
|
-
Then
|
52
|
+
Then(/^the spec(?:s)? should all pass$/) do
|
52
53
|
step 'the output should contain "0 failures"'
|
53
|
-
step
|
54
|
+
step "the exit status should be 0"
|
54
55
|
end
|
55
56
|
|
56
57
|
# RSpec
|
57
|
-
Then
|
58
|
+
Then(/^the spec(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
|
58
59
|
step 'the output should not contain "0 failures"'
|
59
|
-
step
|
60
|
+
step "the exit status should be 1"
|
60
61
|
|
61
62
|
if regex
|
62
63
|
step "the output should match %r<#{string}>"
|
63
64
|
else
|
64
|
-
step
|
65
|
+
step "the output should contain:", string
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
68
69
|
# RSpec
|
69
|
-
Then
|
70
|
+
Then(/^the spec(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
|
70
71
|
step 'the output should contain "0 failures"'
|
71
|
-
step
|
72
|
+
step "the exit status should be 0"
|
72
73
|
|
73
74
|
if regex
|
74
75
|
step "the output should match %r<#{string}>"
|
75
76
|
else
|
76
|
-
step
|
77
|
+
step "the output should contain:", string
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
80
81
|
# Minitest
|
81
|
-
Then
|
82
|
+
Then(/^the tests(?:s)? should not(?: all)? pass(?: with (\d+) failures?)?$/) \
|
83
|
+
do |count_failures|
|
82
84
|
if count_failures.nil?
|
83
85
|
step 'the output should not contain "0 errors"'
|
84
86
|
else
|
85
87
|
step %(the output should contain "#{count_failures} errors")
|
86
88
|
end
|
87
89
|
|
88
|
-
step
|
90
|
+
step "the exit status should be 1"
|
89
91
|
end
|
90
92
|
|
91
93
|
# Minitest
|
92
|
-
Then
|
94
|
+
Then(/^the tests(?:s)? should all pass$/) do
|
93
95
|
step 'the output should contain "0 errors"'
|
94
|
-
step
|
96
|
+
step "the exit status should be 0"
|
95
97
|
end
|
96
98
|
|
97
99
|
# Minitest
|
98
|
-
Then
|
100
|
+
Then(/^the test(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
|
99
101
|
step 'the output should contain "0 errors"'
|
100
|
-
step
|
102
|
+
step "the exit status should be 1"
|
101
103
|
|
102
104
|
if regex
|
103
105
|
step "the output should match %r<#{string}>"
|
104
106
|
else
|
105
|
-
step
|
107
|
+
step "the output should contain:", string
|
106
108
|
end
|
107
109
|
end
|
108
110
|
|
109
111
|
# Minitest
|
110
|
-
Then
|
112
|
+
Then(/^the test(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
|
111
113
|
step 'the output should not contain "0 errors"'
|
112
|
-
step
|
114
|
+
step "the exit status should be 0"
|
113
115
|
|
114
116
|
if regex
|
115
117
|
step "the output should match %r<#{string}>"
|
116
118
|
else
|
117
|
-
step
|
119
|
+
step "the output should contain:", string
|
118
120
|
end
|
119
121
|
end
|