aruba 0.14.9 → 0.14.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/.travis.yml +17 -37
  4. data/CHANGELOG.md +30 -0
  5. data/Gemfile +11 -1
  6. data/features/{getting_started/cleanup.feature → 01_getting_started_with_aruba/cleanup_working_directory.feature} +4 -5
  7. data/features/{getting_started → 01_getting_started_with_aruba}/run_commands.feature +45 -15
  8. data/features/{getting_started → 01_getting_started_with_aruba}/supported_testing_frameworks.feature +5 -21
  9. data/features/{configuration → 02_configure_aruba}/activate_announcer_on_command_failure.feature +2 -2
  10. data/features/{configuration/usage.feature → 02_configure_aruba/basics.feature} +21 -29
  11. data/features/{configuration → 02_configure_aruba}/command_runtime_environment.feature +0 -0
  12. data/features/{configuration → 02_configure_aruba}/console_history_file.feature +2 -2
  13. data/features/{configuration → 02_configure_aruba}/exit_timeout.feature +25 -17
  14. data/features/{configuration → 02_configure_aruba}/fixtures_directories.feature +2 -2
  15. data/features/{configuration → 02_configure_aruba}/fixtures_path_prefix.feature +1 -1
  16. data/features/{configuration → 02_configure_aruba}/home_directory.feature +6 -6
  17. data/features/{configuration → 02_configure_aruba}/io_timeout.feature +2 -2
  18. data/features/{configuration → 02_configure_aruba}/keep_ansi.feature +0 -0
  19. data/features/{configuration → 02_configure_aruba}/log_level.feature +2 -2
  20. data/features/{configuration → 02_configure_aruba}/physical_block_size.feature +3 -3
  21. data/features/{configuration → 02_configure_aruba}/remove_ansi_escape_sequences.feature +2 -2
  22. data/features/{configuration → 02_configure_aruba}/root_directory.feature +1 -1
  23. data/features/{configuration → 02_configure_aruba}/startup_wait_time.feature +2 -2
  24. data/features/{configuration → 02_configure_aruba}/working_directory.feature +9 -4
  25. data/features/{steps/core/announce.feature → 03_testing_frameworks/cucumber/announce_information_for_troubleshooting.feature} +20 -40
  26. data/features/{steps/environment → 03_testing_frameworks/cucumber}/disable_bunder.feature +0 -0
  27. data/features/{steps/command/exit_statuses.feature → 03_testing_frameworks/cucumber/steps/command/check_for_exit_statuses.feature} +20 -20
  28. data/features/{steps/command/output.feature → 03_testing_frameworks/cucumber/steps/command/check_output_of_command.feature} +58 -111
  29. data/features/{steps/command/stderr.feature → 03_testing_frameworks/cucumber/steps/command/check_stderr_of_command.feature} +1 -1
  30. data/features/{steps/command/stdout.feature → 03_testing_frameworks/cucumber/steps/command/check_stdout_of_command.feature} +6 -6
  31. data/features/{steps/command/debug.feature → 03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature} +6 -6
  32. data/features/{steps/command/run.feature → 03_testing_frameworks/cucumber/steps/command/run_a_command.feature} +4 -4
  33. data/features/{steps/command/in_process.feature → 03_testing_frameworks/cucumber/steps/command/run_command_in_process.feature} +2 -2
  34. data/features/{steps/command/interactive.feature → 03_testing_frameworks/cucumber/steps/command/run_command_interactively.feature} +2 -2
  35. data/features/03_testing_frameworks/cucumber/steps/command/run_commands_which_require_a_shell.feature +79 -0
  36. data/features/{steps/command/send_signal.feature → 03_testing_frameworks/cucumber/steps/command/send_signal_to_command.feature} +19 -40
  37. data/features/{steps/command/stop.feature → 03_testing_frameworks/cucumber/steps/command/stop_command.feature} +47 -75
  38. data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/append_environment_variable.feature +3 -3
  39. data/features/{steps/environment/home_variable.feature → 03_testing_frameworks/cucumber/steps/environment/modify_home_variable_for_testing.feature} +4 -4
  40. data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/prepend_environment_variable.feature +3 -3
  41. data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/set_environment_variable.feature +3 -3
  42. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/append_to_file.feature +0 -0
  43. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/cd_to_directory.feature +0 -0
  44. data/features/{steps/filesystem/existence_of_directory.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_directory.feature} +0 -0
  45. data/features/{steps/filesystem/existence_of_file.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_file.feature} +0 -0
  46. data/features/{steps/filesystem/file_content.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_file_content.feature} +57 -0
  47. data/features/{steps/filesystem/non_existence_of_directory.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_directory.feature} +0 -0
  48. data/features/{steps/filesystem/non_existence_of_file.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_file.feature} +0 -0
  49. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/check_permissions_of_file.feature +0 -0
  50. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/compare_files.feature +0 -0
  51. data/features/{steps/filesystem/copy.feature → 03_testing_frameworks/cucumber/steps/filesystem/copy_file_or_directory.feature} +0 -0
  52. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/create_directory.feature +0 -0
  53. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/create_file.feature +0 -0
  54. data/features/{steps/filesystem/move.feature → 03_testing_frameworks/cucumber/steps/filesystem/move_file_or_directory.feature} +0 -1
  55. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/overwrite_file.feature +0 -0
  56. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/remove_directory.feature +0 -0
  57. data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/remove_file.feature +0 -0
  58. data/features/{steps/filesystem/use_fixture.feature → 03_testing_frameworks/cucumber/steps/filesystem/use_fixtures_for_setup_test.feature} +0 -0
  59. data/features/{hooks/after/command.feature → 03_testing_frameworks/rspec/hooks/define_after_hook_for_commands.feature} +1 -4
  60. data/features/{hooks/before/command.feature → 03_testing_frameworks/rspec/hooks/define_before_hook_for_commands.feature} +1 -5
  61. data/features/{rspec/integration.feature → 03_testing_frameworks/rspec/setup_aruba_for_rspec.feature} +17 -17
  62. data/features/{api/command/find_command.feature → 04_aruba_api/command/find_a_started_command.feature} +0 -0
  63. data/features/{api/command/which.feature → 04_aruba_api/command/find_command_in_PATH.feature} +4 -4
  64. data/features/{api/command/stderr.feature → 04_aruba_api/command/read_stderr_of_command.feature} +8 -8
  65. data/features/{api/command/stdout.feature → 04_aruba_api/command/read_stdout_of_command.feature} +7 -7
  66. data/features/{api/command/run.feature → 04_aruba_api/command/run_command.feature} +53 -44
  67. data/features/{api → 04_aruba_api}/command/run_simple.feature +46 -34
  68. data/features/{api/command/send_signal.feature → 04_aruba_api/command/send_signal_to_command.feature} +8 -8
  69. data/features/{api → 04_aruba_api}/command/stop_all_commands.feature +18 -14
  70. data/features/{api/command/stop.feature → 04_aruba_api/command/stop_single_command.feature} +19 -18
  71. data/features/{api → 04_aruba_api}/command/terminate_all_commands.feature +16 -12
  72. data/features/{api/command/last_command_started.feature → 04_aruba_api/command/use_last_command_started.feature} +0 -0
  73. data/features/{api/command/last_command_stopped.feature → 04_aruba_api/command/use_last_command_stopped.feature} +2 -2
  74. data/features/{api → 04_aruba_api}/core/expand_path.feature +0 -0
  75. data/features/{api → 04_aruba_api}/environment/append_environment_variable.feature +0 -0
  76. data/features/{api → 04_aruba_api}/environment/delete_environment_variable.feature +0 -0
  77. data/features/{api → 04_aruba_api}/environment/prepend_environment_variable.feature +0 -0
  78. data/features/{api → 04_aruba_api}/environment/set_environment_variable.feature +0 -0
  79. data/features/{api/filesystem/cd.feature → 04_aruba_api/filesystem/cd_to_directory.feature} +0 -0
  80. data/features/{api/filesystem/does_exist.feature → 04_aruba_api/filesystem/check_existence_file_or_directory.feature} +0 -0
  81. data/features/{api/filesystem/is_absolute.feature → 04_aruba_api/filesystem/check_if_path_is_absolute.feature} +0 -0
  82. data/features/{api/filesystem/is_directory.feature → 04_aruba_api/filesystem/check_if_path_is_directory.feature} +0 -0
  83. data/features/{api/filesystem/is_file.feature → 04_aruba_api/filesystem/check_if_path_is_file.feature} +0 -0
  84. data/features/{api/filesystem/is_relative.feature → 04_aruba_api/filesystem/check_if_path_is_relative.feature} +0 -0
  85. data/features/{api → 04_aruba_api}/filesystem/create_directory.feature +0 -0
  86. data/features/{api/filesystem/move.feature → 04_aruba_api/filesystem/move_file_or_directory.feature} +0 -0
  87. data/features/{api/filesystem/disk_usage.feature → 04_aruba_api/filesystem/report_disk_usage.feature} +0 -0
  88. data/features/{api/filesystem/fixtures.feature → 04_aruba_api/filesystem/use_fixtures.feature} +0 -0
  89. data/features/{api → 04_aruba_api}/text/extract_text.feature +8 -8
  90. data/features/{api → 04_aruba_api}/text/replace_variables.feature +2 -2
  91. data/features/{api → 04_aruba_api}/text/sanitize_text.feature +22 -22
  92. data/features/{api → 04_aruba_api}/text/unescape_text.feature +12 -12
  93. data/features/{matchers/timeouts.feature → 05_use_rspec_matchers/command/check_timeouts.feature} +4 -4
  94. data/features/{matchers → 05_use_rspec_matchers}/directory/have_sub_directory.feature +0 -0
  95. data/features/{matchers → 05_use_rspec_matchers}/file/be_a_command_found_in_path.feature +0 -0
  96. data/features/{matchers → 05_use_rspec_matchers}/file/be_existing_executable.feature +0 -0
  97. data/features/{matchers → 05_use_rspec_matchers}/file/be_existing_file.feature +0 -0
  98. data/features/{matchers → 05_use_rspec_matchers}/file/have_file_content.feature +0 -0
  99. data/features/{matchers → 05_use_rspec_matchers}/file/have_file_size.feature +0 -0
  100. data/features/{matchers → 05_use_rspec_matchers}/path/be_an_absolute_path.feature +0 -0
  101. data/features/{matchers → 05_use_rspec_matchers}/path/be_an_existing_path.feature +0 -0
  102. data/features/{matchers → 05_use_rspec_matchers}/path/have_permissions.feature +4 -4
  103. data/features/{cli/init.feature → 06_use_aruba_cli/initialize_project_with_aruba.feature} +0 -0
  104. data/features/{cli/console.feature → 06_use_aruba_cli/open_console.feature} +0 -0
  105. data/features/08_other/improve_performance_if_using_jruby.feature +37 -0
  106. data/features/step_definitions/hooks.rb +0 -10
  107. data/features/support/env.rb +1 -1
  108. data/features/support/simplecov_setup.rb +9 -6
  109. data/fixtures/cli-app/bin/{cli → aruba-test-cli} +0 -0
  110. data/fixtures/cli-app/spec/spec_helper.rb +1 -0
  111. data/fixtures/empty-app/lib/cli/app.rb +0 -6
  112. data/lib/aruba/api/commands.rb +24 -0
  113. data/lib/aruba/api/core.rb +9 -2
  114. data/lib/aruba/api/deprecated.rb +2 -73
  115. data/lib/aruba/api/filesystem.rb +1 -1
  116. data/lib/aruba/colorizer.rb +10 -99
  117. data/lib/aruba/config/jruby.rb +15 -5
  118. data/lib/aruba/cucumber.rb +1 -0
  119. data/lib/aruba/cucumber/command.rb +63 -93
  120. data/lib/aruba/cucumber/deprecated.rb +93 -0
  121. data/lib/aruba/cucumber/file.rb +0 -12
  122. data/lib/aruba/cucumber/hooks.rb +0 -44
  123. data/lib/aruba/in_process.rb +2 -0
  124. data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
  125. data/lib/aruba/platforms/announcer.rb +1 -1
  126. data/lib/aruba/platforms/command_monitor.rb +0 -3
  127. data/lib/aruba/processes/spawn_process.rb +17 -5
  128. data/lib/aruba/spawn_process.rb +4 -1
  129. data/lib/aruba/version.rb +1 -1
  130. data/script/bootstrap +0 -4
  131. data/spec/aruba/api/core_spec.rb +142 -0
  132. data/spec/aruba/api/deprecated_spec.rb +113 -0
  133. data/spec/aruba/api/filesystem_spec.rb +746 -0
  134. data/spec/aruba/api_spec.rb +1 -885
  135. data/spec/aruba/jruby_spec.rb +46 -28
  136. data/spec/aruba/{spawn_process_spec.rb → processes/spawn_process_spec.rb} +18 -2
  137. data/spec/spec_helper.rb +5 -3
  138. metadata +108 -115
  139. data/features/development/build.feature +0 -15
  140. data/features/getting_started/writing_good_feature_tests.feature +0 -38
  141. data/features/matchers/collection/include_an_object.feature +0 -72
  142. data/features/platforms/jruby.feature +0 -14
  143. data/features/step_definitions/aruba_dev_steps.rb +0 -56
  144. data/features/steps/command/shell.feature +0 -155
  145. data/features/steps/filesystem/check_file_content.feature +0 -61
  146. data/features/steps/filesystem/fixtures.feature +0 -64
  147. data/features/steps/overview.feature +0 -25
  148. data/spec/aruba/api/environment/restore_env_spec.rb +0 -86
  149. data/spec/aruba/api/environment/set_env_spec.rb +0 -46
  150. data/spec/aruba/api/filesystem/file_size_spec.rb +0 -28
@@ -7,7 +7,7 @@ Feature: Check exit status of commands
7
7
  Given I use a fixture named "cli-app"
8
8
 
9
9
  Scenario: Test for exit status of 0
10
- Given an executable named "bin/cli" with:
10
+ Given an executable named "bin/aruba-test-cli" with:
11
11
  """
12
12
  #!/bin/bash
13
13
  exit 0
@@ -16,14 +16,14 @@ Feature: Check exit status of commands
16
16
  """
17
17
  Feature: Exit status
18
18
  Scenario: Run command
19
- When I run `cli`
19
+ When I run `aruba-test-cli`
20
20
  Then the exit status should be 0
21
21
  """
22
22
  When I run `cucumber`
23
23
  Then the features should all pass
24
24
 
25
25
  Scenario: Test for exit status 1
26
- Given an executable named "bin/cli" with:
26
+ Given an executable named "bin/aruba-test-cli" with:
27
27
  """
28
28
  #!/bin/bash
29
29
  exit 1
@@ -32,14 +32,14 @@ Feature: Check exit status of commands
32
32
  """
33
33
  Feature: Failing program
34
34
  Scenario: Run command
35
- When I run `cli`
35
+ When I run `aruba-test-cli`
36
36
  Then the exit status should be 1
37
37
  """
38
38
  When I run `cucumber`
39
39
  Then the features should all pass
40
40
 
41
41
  Scenario: Test for non-zero exit status
42
- Given an executable named "bin/cli" with:
42
+ Given an executable named "bin/aruba-test-cli" with:
43
43
  """
44
44
  #!/bin/bash
45
45
  exit 1
@@ -48,14 +48,14 @@ Feature: Check exit status of commands
48
48
  """
49
49
  Feature: Failing program
50
50
  Scenario: Run command
51
- When I run `cli`
51
+ When I run `aruba-test-cli`
52
52
  Then the exit status should not be 0
53
53
  """
54
54
  When I run `cucumber`
55
55
  Then the features should all pass
56
56
 
57
57
  Scenario: Successfully run something
58
- Given an executable named "bin/cli" with:
58
+ Given an executable named "bin/aruba-test-cli" with:
59
59
  """
60
60
  #!/bin/bash
61
61
  exit 0
@@ -64,13 +64,13 @@ Feature: Check exit status of commands
64
64
  """
65
65
  Feature: Failing program
66
66
  Scenario: Run command
67
- When I successfully run `cli`
67
+ When I successfully run `aruba-test-cli`
68
68
  """
69
69
  When I run `cucumber`
70
70
  Then the features should all pass
71
71
 
72
72
  Scenario: Fail to run something successfully
73
- Given an executable named "bin/cli" with:
73
+ Given an executable named "bin/aruba-test-cli" with:
74
74
  """
75
75
  #!/bin/bash
76
76
  exit 1
@@ -79,45 +79,45 @@ Feature: Check exit status of commands
79
79
  """
80
80
  Feature: Failing program
81
81
  Scenario: Run command
82
- When I successfully run `cli`
82
+ When I successfully run `aruba-test-cli`
83
83
  """
84
84
  When I run `cucumber`
85
85
  Then the features should not all pass
86
86
 
87
87
  Scenario: Overwrite the default exit timeout via step
88
- Given an executable named "bin/cli" with:
88
+ Given an executable named "bin/aruba-test-cli" with:
89
89
  """
90
90
  #!/bin/bash
91
- sleep 1
91
+ sleep 0.1
92
92
  """
93
93
  And a file named "features/exit_status.feature" with:
94
94
  """
95
95
  Feature: Failing program
96
96
  Scenario: Run command
97
- Given the default aruba exit timeout is 2 seconds
98
- When I successfully run `cli`
97
+ Given the default aruba exit timeout is 0.2 seconds
98
+ When I successfully run `aruba-test-cli`
99
99
  """
100
100
  When I run `cucumber`
101
101
  Then the features should all pass
102
102
 
103
103
  Scenario: Successfully run something longer then the default time
104
- Given an executable named "bin/cli" with:
104
+ Given an executable named "bin/aruba-test-cli" with:
105
105
  """
106
106
  #!/bin/bash
107
- sleep 1
107
+ sleep 0.1
108
108
  """
109
109
  And a file named "features/exit_status.feature" with:
110
110
  """
111
111
  Feature: Failing program
112
112
  Scenario: Run command
113
113
  Given the default aruba exit timeout is 0 seconds
114
- When I successfully run `cli` for up to 2 seconds
114
+ When I successfully run `aruba-test-cli` for up to 0.2 seconds
115
115
  """
116
116
  When I run `cucumber`
117
117
  Then the features should all pass
118
118
 
119
119
  Scenario: Unsuccessfully run something that takes too long
120
- Given an executable named "bin/cli" with:
120
+ Given an executable named "bin/aruba-test-cli" with:
121
121
  """
122
122
  #!/bin/bash
123
123
  sleep 2
@@ -127,10 +127,10 @@ Feature: Check exit status of commands
127
127
  Feature: Failing program
128
128
  Scenario: Run command
129
129
  Given the default aruba exit timeout is 0 seconds
130
- When I successfully run `cli` for up to 1 seconds
130
+ When I successfully run `aruba-test-cli` for up to 1 seconds
131
131
  """
132
132
  When I run `cucumber`
133
133
  Then the features should not all pass with:
134
134
  """
135
- expected "cli" to have finished in time
135
+ expected "aruba-test-cli" to have finished in time
136
136
  """
@@ -8,7 +8,7 @@ Feature: All output of commands which were executed
8
8
  Given I use a fixture named "cli-app"
9
9
 
10
10
  Scenario: Detect subset of one-line output
11
- Given an executable named "bin/cli" with:
11
+ Given an executable named "bin/aruba-test-cli" with:
12
12
  """bash
13
13
  #!/usr/bin/env bash
14
14
 
@@ -18,14 +18,14 @@ Feature: All output of commands which were executed
18
18
  """cucumber
19
19
  Feature: Run command
20
20
  Scenario: Run command
21
- When I run `cli`
21
+ When I run `aruba-test-cli`
22
22
  Then the output should contain "hello world"
23
23
  """
24
24
  When I run `cucumber`
25
25
  Then the features should all pass
26
26
 
27
27
  Scenario: Detect absence of one-line output
28
- Given an executable named "bin/cli" with:
28
+ Given an executable named "bin/aruba-test-cli" with:
29
29
  """bash
30
30
  #!/usr/bin/env bash
31
31
 
@@ -35,14 +35,14 @@ Feature: All output of commands which were executed
35
35
  """cucumber
36
36
  Feature: Run command
37
37
  Scenario: Run command
38
- When I run `cli`
38
+ When I run `aruba-test-cli`
39
39
  Then the output should not contain "good-bye"
40
40
  """
41
41
  When I run `cucumber`
42
42
  Then the features should all pass
43
43
 
44
44
  Scenario: Detect subset of multiline output
45
- Given an executable named "bin/cli" with:
45
+ Given an executable named "bin/aruba-test-cli" with:
46
46
  """bash
47
47
  #!/usr/bin/env bash
48
48
 
@@ -52,7 +52,7 @@ Feature: All output of commands which were executed
52
52
  """cucumber
53
53
  Feature: Run command
54
54
  Scenario: Run command
55
- When I run `cli`
55
+ When I run `aruba-test-cli`
56
56
  Then the output should contain:
57
57
  \"\"\"
58
58
  hello
@@ -62,7 +62,7 @@ Feature: All output of commands which were executed
62
62
  Then the features should all pass
63
63
 
64
64
  Scenario: Detect absence of subset of multiline output
65
- Given an executable named "bin/cli" with:
65
+ Given an executable named "bin/aruba-test-cli" with:
66
66
  """bash
67
67
  #!/usr/bin/env bash
68
68
 
@@ -72,7 +72,7 @@ Feature: All output of commands which were executed
72
72
  """cucumber
73
73
  Feature: Run command
74
74
  Scenario: Run command
75
- When I run `cli`
75
+ When I run `aruba-test-cli`
76
76
  Then the output should not contain:
77
77
  \"\"\"
78
78
  good-bye
@@ -96,7 +96,7 @@ Feature: All output of commands which were executed
96
96
  Then the features should all pass
97
97
 
98
98
  Scenario: Detect exact one-line output with ANSI output
99
- Given an executable named "bin/cli" with:
99
+ Given an executable named "bin/aruba-test-cli" with:
100
100
  """bash
101
101
  #!/usr/bin/env bash
102
102
 
@@ -107,7 +107,7 @@ Feature: All output of commands which were executed
107
107
  Feature: Run command
108
108
  @keep-ansi-escape-sequences
109
109
  Scenario: Run command
110
- When I run `cli`
110
+ When I run `aruba-test-cli`
111
111
  Then the output should contain exactly:
112
112
  \"\"\"
113
113
  \e[36mhello world\e[0m
@@ -118,7 +118,7 @@ Feature: All output of commands which were executed
118
118
 
119
119
  Scenario: Detect exact one-line output with ANSI output stripped by default
120
120
  Given the default aruba exit timeout is 12 seconds
121
- Given an executable named "bin/cli" with:
121
+ Given an executable named "bin/aruba-test-cli" with:
122
122
  """bash
123
123
  #!/usr/bin/env bash
124
124
 
@@ -128,7 +128,7 @@ Feature: All output of commands which were executed
128
128
  """cucumber
129
129
  Feature: Run command
130
130
  Scenario: Run command
131
- When I run `cli`
131
+ When I run `aruba-test-cli`
132
132
  Then the output should contain exactly:
133
133
  \"\"\"
134
134
  hello world
@@ -138,7 +138,7 @@ Feature: All output of commands which were executed
138
138
  Then the features should all pass
139
139
 
140
140
  Scenario: Detect exact multiline output
141
- Given an executable named "bin/cli" with:
141
+ Given an executable named "bin/aruba-test-cli" with:
142
142
  """bash
143
143
  #!/usr/bin/env bash
144
144
 
@@ -148,7 +148,7 @@ Feature: All output of commands which were executed
148
148
  """cucumber
149
149
  Feature: Run command
150
150
  Scenario: Run command
151
- When I run `cli`
151
+ When I run `aruba-test-cli`
152
152
  Then the output should contain exactly:
153
153
  \"\"\"
154
154
  hello
@@ -158,25 +158,8 @@ Feature: All output of commands which were executed
158
158
  When I run `cucumber`
159
159
  Then the features should all pass
160
160
 
161
- Scenario: Detect subset of one-line output
162
- Given an executable named "bin/cli" with:
163
- """bash
164
- #!/usr/bin/env bash
165
-
166
- echo 'hello world'
167
- """
168
- And a file named "features/output.feature" with:
169
- """cucumber
170
- Feature: Run command
171
- Scenario: Run command
172
- When I run `cli`
173
- Then the output should contain "hello world"
174
- """
175
- When I run `cucumber`
176
- Then the features should all pass
177
-
178
161
  Scenario: Detect subset of one-line output with regex
179
- Given an executable named "bin/cli" with:
162
+ Given an executable named "bin/aruba-test-cli" with:
180
163
  """bash
181
164
  #!/usr/bin/env bash
182
165
 
@@ -186,14 +169,14 @@ Feature: All output of commands which were executed
186
169
  """cucumber
187
170
  Feature: Run command
188
171
  Scenario: Run command
189
- When I run `cli`
172
+ When I run `aruba-test-cli`
190
173
  Then the output should match /^hello(, world)?/
191
174
  """
192
175
  When I run `cucumber`
193
176
  Then the features should all pass
194
177
 
195
178
  Scenario: Detect subset of multiline output with regex
196
- Given an executable named "bin/cli" with:
179
+ Given an executable named "bin/aruba-test-cli" with:
197
180
  """bash
198
181
  #!/usr/bin/env bash
199
182
 
@@ -203,7 +186,7 @@ Feature: All output of commands which were executed
203
186
  """cucumber
204
187
  Feature: Run command
205
188
  Scenario: Run command
206
- When I run `cli`
189
+ When I run `aruba-test-cli`
207
190
  Then the output should match:
208
191
  \"\"\"
209
192
  he..o
@@ -216,7 +199,7 @@ Feature: All output of commands which were executed
216
199
  Then the features should all pass
217
200
 
218
201
  Scenario: Negative matching of one-line output with regex
219
- Given an executable named "bin/cli" with:
202
+ Given an executable named "bin/aruba-test-cli" with:
220
203
  """bash
221
204
  #!/usr/bin/env bash
222
205
 
@@ -226,14 +209,14 @@ Feature: All output of commands which were executed
226
209
  """cucumber
227
210
  Feature: Run command
228
211
  Scenario: Run command
229
- When I run `cli`
212
+ When I run `aruba-test-cli`
230
213
  Then the output should not match /ruby is a better perl$/
231
214
  """
232
215
  When I run `cucumber`
233
216
  Then the features should all pass
234
217
 
235
218
  Scenario: Negative matching of multiline output with regex
236
- Given an executable named "bin/cli" with:
219
+ Given an executable named "bin/aruba-test-cli" with:
237
220
  """bash
238
221
  #!/usr/bin/env bash
239
222
 
@@ -243,7 +226,7 @@ Feature: All output of commands which were executed
243
226
  """cucumber
244
227
  Feature: Run command
245
228
  Scenario: Run command
246
- When I run `cli`
229
+ When I run `aruba-test-cli`
247
230
  Then the output should not match:
248
231
  \"\"\"
249
232
  ruby
@@ -257,7 +240,7 @@ Feature: All output of commands which were executed
257
240
  Then the features should all pass
258
241
 
259
242
  Scenario: Match passing exit status and partial output
260
- Given an executable named "bin/cli" with:
243
+ Given an executable named "bin/aruba-test-cli" with:
261
244
  """bash
262
245
  #!/usr/bin/env bash
263
246
 
@@ -268,7 +251,7 @@ Feature: All output of commands which were executed
268
251
  """cucumber
269
252
  Feature: Run command
270
253
  Scenario: Run command
271
- When I run `cli`
254
+ When I run `aruba-test-cli`
272
255
  Then it should pass with:
273
256
  \"\"\"
274
257
  hello
@@ -278,7 +261,7 @@ Feature: All output of commands which were executed
278
261
  Then the features should all pass
279
262
 
280
263
  Scenario: Match passing exit status and exact output
281
- Given an executable named "bin/cli" with:
264
+ Given an executable named "bin/aruba-test-cli" with:
282
265
  """bash
283
266
  #!/usr/bin/env bash
284
267
 
@@ -289,7 +272,7 @@ Feature: All output of commands which were executed
289
272
  """cucumber
290
273
  Feature: Run command
291
274
  Scenario: Run command
292
- When I run `cli`
275
+ When I run `aruba-test-cli`
293
276
  Then it should pass with exactly:
294
277
  \"\"\"
295
278
  hello
@@ -300,7 +283,7 @@ Feature: All output of commands which were executed
300
283
  Then the features should all pass
301
284
 
302
285
  Scenario: Match failing exit status and partial output
303
- Given an executable named "bin/cli" with:
286
+ Given an executable named "bin/aruba-test-cli" with:
304
287
  """bash
305
288
  #!/usr/bin/env bash
306
289
 
@@ -311,7 +294,7 @@ Feature: All output of commands which were executed
311
294
  """cucumber
312
295
  Feature: Run command
313
296
  Scenario: Run command
314
- When I run `cli`
297
+ When I run `aruba-test-cli`
315
298
  Then it should fail with:
316
299
  \"\"\"
317
300
  hello
@@ -322,7 +305,7 @@ Feature: All output of commands which were executed
322
305
 
323
306
 
324
307
  Scenario: Match failing exit status and exact output
325
- Given an executable named "bin/cli" with:
308
+ Given an executable named "bin/aruba-test-cli" with:
326
309
  """bash
327
310
  #!/usr/bin/env bash
328
311
 
@@ -333,7 +316,7 @@ Feature: All output of commands which were executed
333
316
  """cucumber
334
317
  Feature: Run command
335
318
  Scenario: Run command
336
- When I run `cli`
319
+ When I run `aruba-test-cli`
337
320
  Then it should fail with:
338
321
  \"\"\"
339
322
  hello
@@ -344,7 +327,7 @@ Feature: All output of commands which were executed
344
327
  Then the features should all pass
345
328
 
346
329
  Scenario: Match failing exit status and output with regex
347
- Given an executable named "bin/cli" with:
330
+ Given an executable named "bin/aruba-test-cli" with:
348
331
  """bash
349
332
  #!/usr/bin/env bash
350
333
 
@@ -355,7 +338,7 @@ Feature: All output of commands which were executed
355
338
  """cucumber
356
339
  Feature: Run command
357
340
  Scenario: Run command
358
- When I run `cli`
341
+ When I run `aruba-test-cli`
359
342
  Then it should fail with regex:
360
343
  \"\"\"
361
344
  hello\s*world
@@ -364,15 +347,14 @@ Feature: All output of commands which were executed
364
347
  When I run `cucumber`
365
348
  Then the features should all pass
366
349
 
367
- @requires-aruba-version-1
368
350
  Scenario: Detect output from all processes
369
- Given an executable named "bin/cli1" with:
351
+ Given an executable named "bin/aruba-test-cli1" with:
370
352
  """bash
371
353
  #!/usr/bin/env bash
372
354
 
373
355
  echo 'This is cli1'
374
356
  """
375
- And an executable named "bin/cli2" with:
357
+ And an executable named "bin/aruba-test-cli2" with:
376
358
  """bash
377
359
  #!/usr/bin/env bash
378
360
 
@@ -382,39 +364,40 @@ Feature: All output of commands which were executed
382
364
  """cucumber
383
365
  Feature: Run command
384
366
  Scenario: Run command
385
- When I run `cli1`
386
- When I run `cli2`
367
+ When I run `aruba-test-cli1`
368
+ When I run `aruba-test-cli2`
387
369
  Then the stdout should contain exactly:
388
370
  \"\"\"
389
371
  This is cli1
390
- \"\"\"
391
- And the stdout should contain exactly:
392
- \"\"\"
393
372
  This is cli2
394
373
  \"\"\"
395
374
  """
396
375
  When I run `cucumber`
397
376
  Then the features should all pass
398
377
 
399
- Scenario: Detect output from all processes (deprecated)
400
- Given an executable named "bin/cli1" with:
401
- """bash
378
+ Scenario: Detect combined output from normal and interactive processes
379
+ Given an executable named "bin/aruba-test-cli1" with:
380
+ """
402
381
  #!/usr/bin/env bash
403
-
404
382
  echo 'This is cli1'
405
383
  """
406
- And an executable named "bin/cli2" with:
407
- """bash
408
- #!/usr/bin/env bash
384
+ And an executable named "bin/aruba-test-cli2" with:
385
+ """
386
+ #!/usr/bin/env ruby
409
387
 
410
- echo 'This is cli2'
388
+ while input = gets do
389
+ break if "" == input
390
+ puts input
391
+ end
411
392
  """
412
393
  And a file named "features/output.feature" with:
413
- """cucumber
394
+ """
414
395
  Feature: Run command
415
396
  Scenario: Run command
416
- When I run `cli1`
417
- When I run `cli2`
397
+ When I run `aruba-test-cli1`
398
+ When I run `aruba-test-cli2` interactively
399
+ And I type "This is cli2"
400
+ And I type ""
418
401
  Then the stdout should contain exactly:
419
402
  \"\"\"
420
403
  This is cli1
@@ -425,11 +408,11 @@ Feature: All output of commands which were executed
425
408
  Then the features should all pass
426
409
 
427
410
  Scenario: Handle little output
428
- Given an executable named "bin/cli" with:
411
+ Given an executable named "bin/aruba-test-cli" with:
429
412
  """bash
430
413
  #!/usr/bin/env bash
431
414
 
432
- for ((c=0; c<256; c = c+1)); do
415
+ for ((c=0; c<256; c = c+1)); do
433
416
  echo -n "a"
434
417
  done
435
418
  """
@@ -437,7 +420,7 @@ Feature: All output of commands which were executed
437
420
  """cucumber
438
421
  Feature: Flushing output
439
422
  Scenario: Run command
440
- When I run `cli`
423
+ When I run `aruba-test-cli`
441
424
  Then the output should contain "a"
442
425
  And the output should be 256 bytes long
443
426
  And the exit status should be 0
@@ -452,7 +435,7 @@ Feature: All output of commands which were executed
452
435
  I want to make sure that large amounts of output aren't buffered
453
436
 
454
437
  Given the default aruba exit timeout is 10 seconds
455
- And an executable named "bin/cli" with:
438
+ And an executable named "bin/aruba-test-cli" with:
456
439
  """bash
457
440
  #!/usr/bin/env bash
458
441
 
@@ -464,7 +447,7 @@ Feature: All output of commands which were executed
464
447
  """cucumber
465
448
  Feature: Flushing output
466
449
  Scenario: Run command
467
- When I run `cli`
450
+ When I run `aruba-test-cli`
468
451
  Then the output should contain "a"
469
452
  And the output should be 65536 bytes long
470
453
  And the exit status should be 0
@@ -474,7 +457,7 @@ Feature: All output of commands which were executed
474
457
 
475
458
  Scenario: Handle tons of interactive output
476
459
  Given the default aruba exit timeout is 10 seconds
477
- And an executable named "bin/cli" with:
460
+ And an executable named "bin/aruba-test-cli" with:
478
461
  """bash
479
462
  #!/usr/bin/env bash
480
463
 
@@ -486,7 +469,7 @@ Feature: All output of commands which were executed
486
469
  """cucumber
487
470
  Feature: Flushing output
488
471
  Scenario: Run command
489
- When I run `cli` interactively
472
+ When I run `aruba-test-cli` interactively
490
473
  And I type "65536"
491
474
  Then the output should contain "a"
492
475
  And the output should be 65536 bytes long
@@ -495,42 +478,6 @@ Feature: All output of commands which were executed
495
478
  When I run `cucumber`
496
479
  Then the features should all pass
497
480
 
498
- @requires-aruba-version-1
499
- Scenario: Detect output from all processes normal and interactive ones
500
- Given an executable named "bin/cli1" with:
501
- """
502
- #!/usr/bin/env bash
503
- echo 'This is cli1'
504
- """
505
- And an executable named "bin/cli2" with:
506
- """
507
- #!/usr/bin/env ruby
508
-
509
- while input = gets do
510
- break if "" == input
511
- puts input
512
- end
513
- """
514
- And a file named "features/output.feature" with:
515
- """
516
- Feature: Run command
517
- Scenario: Run command
518
- When I run `cli1`
519
- When I run `cli2` interactively
520
- And I type "This is cli2"
521
- And I type ""
522
- Then the stdout should contain exactly:
523
- \"\"\"
524
- This is cli1
525
- \"\"\"
526
- And the stdout should contain exactly:
527
- \"\"\"
528
- This is cli2
529
- \"\"\"
530
- """
531
- When I run `cucumber`
532
- Then the features should all pass
533
-
534
481
  Scenario: Detect output from named source
535
482
  Given a file named "features/output.feature" with:
536
483
  """