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
@@ -6,7 +6,7 @@ Feature: Terminate all commands
6
6
  Given I use a fixture named "cli-app"
7
7
 
8
8
  Scenario: Multiple commands are running
9
- Given an executable named "bin/cli" with:
9
+ Given an executable named "bin/aruba-test-cli" with:
10
10
  """bash
11
11
  #!/bin/bash
12
12
  sleep 3
@@ -16,8 +16,8 @@ Feature: Terminate all commands
16
16
  require 'spec_helper'
17
17
 
18
18
  RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 5 do
19
- before(:each) { run_command('cli') }
20
- before(:each) { run_command('cli') }
19
+ before(:each) { run_command('aruba-test-cli') }
20
+ before(:each) { run_command('aruba-test-cli') }
21
21
 
22
22
  before(:each) { terminate_all_commands }
23
23
 
@@ -28,25 +28,29 @@ Feature: Terminate all commands
28
28
  Then the specs should all pass
29
29
 
30
30
  Scenario: Terminate all commands for which the block returns true
31
- Given an executable named "bin/cli" with:
31
+ Given an executable named "bin/aruba-test-cli" with:
32
32
  """bash
33
33
  #!/bin/bash
34
- sleep 1
34
+ sleep 0.5
35
35
  """
36
36
  And a file named "spec/run_spec.rb" with:
37
37
  """ruby
38
38
  require 'spec_helper'
39
39
 
40
- RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 2 do
41
- before(:each) { @cmd1 = run_command('cli') }
42
- before(:each) { @cmd2 = run_command('cli') }
40
+ RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 1 do
41
+ before(:each) { @cmd1 = run_command('aruba-test-cli') }
42
+ before(:each) { @cmd2 = run_command('aruba-test-cli') }
43
43
  before(:each) { @cmd3 = run_command('sleep 1') }
44
44
 
45
- before(:each) { terminate_all_commands { |c| c.commandline == 'cli' } }
45
+ before(:each) { terminate_all_commands { |c| c.commandline == 'aruba-test-cli' } }
46
46
 
47
- it { expect(@cmd1).to be_stopped }
48
- it { expect(@cmd2).to be_stopped }
49
- it { expect(@cmd3).not_to be_stopped }
47
+ it 'only terminates selected commands' do
48
+ aggregate_failures do
49
+ expect(@cmd1).to be_stopped
50
+ expect(@cmd2).to be_stopped
51
+ expect(@cmd3).not_to be_stopped
52
+ end
53
+ end
50
54
  end
51
55
  """
52
56
  When I run `rspec`
@@ -70,7 +70,7 @@ Feature: Return last command stopped
70
70
 
71
71
  @requires-aruba-version-1
72
72
  Scenario: No command has been stopped
73
- Given an executable named "bin/cli" with:
73
+ Given an executable named "bin/aruba-test-cli" with:
74
74
  """bash
75
75
  #!/bin/bash
76
76
  while [ true ]; do sleep 1; done
@@ -80,7 +80,7 @@ Feature: Return last command stopped
80
80
  require 'spec_helper'
81
81
 
82
82
  RSpec.describe 'Run command', :type => :aruba do
83
- before(:each) { run_command('cli') }
83
+ before(:each) { run_command('aruba-test-cli') }
84
84
 
85
85
  it { expect{ last_command_stopped.commandline }.to raise_error Aruba::NoCommandHasBeenStoppedError }
86
86
  end
@@ -7,7 +7,7 @@ Feature: Extract text from output
7
7
  Given I use a fixture named "cli-app"
8
8
 
9
9
  Scenario: Output contains ansi escape codes prefixed by \e
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
  echo -n "\e[31mText"
@@ -17,7 +17,7 @@ Feature: Extract text from output
17
17
  require 'spec_helper'
18
18
 
19
19
  RSpec.describe 'Run command', :type => :aruba do
20
- before(:each) { run_command('cli') }
20
+ before(:each) { run_command('aruba-test-cli') }
21
21
  before(:each) { stop_all_commands }
22
22
 
23
23
  it { expect(extract_text(unescape_text(last_command.output))).to eq "Text" }
@@ -27,7 +27,7 @@ Feature: Extract text from output
27
27
  Then the specs should all pass
28
28
 
29
29
  Scenario: Output contains ansi escape codes prefixed by \033
30
- Given an executable named "bin/cli" with:
30
+ Given an executable named "bin/aruba-test-cli" with:
31
31
  """
32
32
  #!/bin/bash
33
33
  echo -n "\033[31mText"
@@ -37,7 +37,7 @@ Feature: Extract text from output
37
37
  require 'spec_helper'
38
38
 
39
39
  RSpec.describe 'Run command', :type => :aruba do
40
- before(:each) { run_command('cli') }
40
+ before(:each) { run_command('aruba-test-cli') }
41
41
  before(:each) { stop_all_commands }
42
42
 
43
43
  it { expect(extract_text(unescape_text(last_command.output))).to eq "Text" }
@@ -47,7 +47,7 @@ Feature: Extract text from output
47
47
  Then the specs should all pass
48
48
 
49
49
  # Scenario: Output contains ansi escape code \016
50
- # Given an executable named "bin/cli" with:
50
+ # Given an executable named "bin/aruba-test-cli" with:
51
51
  # """
52
52
  # #!/bin/bash
53
53
  # echo -n "\016Text"
@@ -57,7 +57,7 @@ Feature: Extract text from output
57
57
  # require 'spec_helper'
58
58
  #
59
59
  # RSpec.describe 'Run command', :type => :aruba do
60
- # before(:each) { run_command('cli') }
60
+ # before(:each) { run_command('aruba-test-cli') }
61
61
  # before(:each) { stop_all_commands }
62
62
  #
63
63
  # it { expect(extract_text(unescape_text(last_command.output))).to eq "Text" }
@@ -67,7 +67,7 @@ Feature: Extract text from output
67
67
  # Then the specs should all pass
68
68
 
69
69
  # Scenario: Output contains ansi escape code \017
70
- # Given an executable named "bin/cli" with:
70
+ # Given an executable named "bin/aruba-test-cli" with:
71
71
  # """
72
72
  # #!/bin/bash
73
73
  # echo -n "\017Text"
@@ -77,7 +77,7 @@ Feature: Extract text from output
77
77
  # require 'spec_helper'
78
78
  #
79
79
  # RSpec.describe 'Run command', :type => :aruba do
80
- # before(:each) { run_command('cli') }
80
+ # before(:each) { run_command('aruba-test-cli') }
81
81
  # before(:each) { stop_all_commands }
82
82
  #
83
83
  # it { expect(extract_text(unescape_text(last_command.output))).to eq "Text" }
@@ -12,7 +12,7 @@ Feature: Replace variables
12
12
  Given I use a fixture named "cli-app"
13
13
 
14
14
  Scenario: PID of last command started
15
- Given an executable named "bin/cli" with:
15
+ Given an executable named "bin/aruba-test-cli" with:
16
16
  """
17
17
  #!/bin/bash
18
18
  exit 0
@@ -22,7 +22,7 @@ Feature: Replace variables
22
22
  require 'spec_helper'
23
23
 
24
24
  RSpec.describe 'Run command', :type => :aruba do
25
- before(:each) { run_command('cli') }
25
+ before(:each) { run_command('aruba-test-cli') }
26
26
  before(:each) { stop_all_commands }
27
27
 
28
28
  it { expect(replace_variables('<pid-last-command-started>')).to eq last_command_started.pid.to_s }
@@ -8,7 +8,7 @@ Feature: Sanitize text from output
8
8
  Given I use a fixture named "cli-app"
9
9
 
10
10
  Scenario: Output contains \n
11
- Given an executable named "bin/cli" with:
11
+ Given an executable named "bin/aruba-test-cli" with:
12
12
  """
13
13
  #!/bin/bash
14
14
  echo -n 'text\ntext'
@@ -18,7 +18,7 @@ Feature: Sanitize text from output
18
18
  require 'spec_helper'
19
19
 
20
20
  RSpec.describe 'Run command', :type => :aruba do
21
- before(:each) { run_command('cli') }
21
+ before(:each) { run_command('aruba-test-cli') }
22
22
  before(:each) { stop_all_commands }
23
23
 
24
24
  it { expect(sanitize_text(last_command_started.output)).to eq "text\ntext" }
@@ -28,7 +28,7 @@ Feature: Sanitize text from output
28
28
  Then the specs should all pass
29
29
 
30
30
  Scenario: Output contains \e
31
- Given an executable named "bin/cli" with:
31
+ Given an executable named "bin/aruba-test-cli" with:
32
32
  """
33
33
  #!/bin/bash
34
34
  echo -n 'text\etext'
@@ -38,7 +38,7 @@ Feature: Sanitize text from output
38
38
  require 'spec_helper'
39
39
 
40
40
  RSpec.describe 'Run command', :type => :aruba do
41
- before(:each) { run_command('cli') }
41
+ before(:each) { run_command('aruba-test-cli') }
42
42
  before(:each) { stop_all_commands }
43
43
 
44
44
  it { expect(sanitize_text(last_command_started.output)).to eq "texttext" }
@@ -48,7 +48,7 @@ Feature: Sanitize text from output
48
48
  Then the specs should all pass
49
49
 
50
50
  Scenario: Output contains \"
51
- Given an executable named "bin/cli" with:
51
+ Given an executable named "bin/aruba-test-cli" with:
52
52
  """
53
53
  #!/bin/bash
54
54
  echo -n 'text\"text'
@@ -58,7 +58,7 @@ Feature: Sanitize text from output
58
58
  require 'spec_helper'
59
59
 
60
60
  RSpec.describe 'Run command', :type => :aruba do
61
- before(:each) { run_command('cli') }
61
+ before(:each) { run_command('aruba-test-cli') }
62
62
  before(:each) { stop_all_commands }
63
63
 
64
64
  it { expect(sanitize_text(last_command_started.output)).to eq "text\"text" }
@@ -68,7 +68,7 @@ Feature: Sanitize text from output
68
68
  Then the specs should all pass
69
69
 
70
70
  Scenario: Output contains \033
71
- Given an executable named "bin/cli" with:
71
+ Given an executable named "bin/aruba-test-cli" with:
72
72
  """
73
73
  #!/bin/bash
74
74
  echo -n 'text\033text'
@@ -78,7 +78,7 @@ Feature: Sanitize text from output
78
78
  require 'spec_helper'
79
79
 
80
80
  RSpec.describe 'Run command', :type => :aruba do
81
- before(:each) { run_command('cli') }
81
+ before(:each) { run_command('aruba-test-cli') }
82
82
  before(:each) { stop_all_commands }
83
83
 
84
84
  it { expect(sanitize_text(last_command_started.output)).to eq "texttext" }
@@ -88,7 +88,7 @@ Feature: Sanitize text from output
88
88
  Then the specs should all pass
89
89
 
90
90
  Scenario: Output contains \017
91
- Given an executable named "bin/cli" with:
91
+ Given an executable named "bin/aruba-test-cli" with:
92
92
  """
93
93
  #!/bin/bash
94
94
  echo -n 'text\017text'
@@ -98,7 +98,7 @@ Feature: Sanitize text from output
98
98
  require 'spec_helper'
99
99
 
100
100
  RSpec.describe 'Run command', :type => :aruba do
101
- before(:each) { run_command('cli') }
101
+ before(:each) { run_command('aruba-test-cli') }
102
102
  before(:each) { stop_all_commands }
103
103
 
104
104
  it { expect(sanitize_text(last_command_started.output)).to eq "texttext" }
@@ -108,7 +108,7 @@ Feature: Sanitize text from output
108
108
  Then the specs should all pass
109
109
 
110
110
  Scenario: Output contains \016
111
- Given an executable named "bin/cli" with:
111
+ Given an executable named "bin/aruba-test-cli" with:
112
112
  """
113
113
  #!/bin/bash
114
114
  echo -n 'text\016text'
@@ -118,7 +118,7 @@ Feature: Sanitize text from output
118
118
  require 'spec_helper'
119
119
 
120
120
  RSpec.describe 'Run command', :type => :aruba do
121
- before(:each) { run_command('cli') }
121
+ before(:each) { run_command('aruba-test-cli') }
122
122
  before(:each) { stop_all_commands }
123
123
 
124
124
  it { expect(sanitize_text(last_command_started.output)).to eq "texttext" }
@@ -128,7 +128,7 @@ Feature: Sanitize text from output
128
128
  Then the specs should all pass
129
129
 
130
130
  Scenario: Output contains ansi escape codes prefixed by \e
131
- Given an executable named "bin/cli" with:
131
+ Given an executable named "bin/aruba-test-cli" with:
132
132
  """
133
133
  #!/bin/bash
134
134
  echo -n "\e[31mText"
@@ -138,7 +138,7 @@ Feature: Sanitize text from output
138
138
  require 'spec_helper'
139
139
 
140
140
  RSpec.describe 'Run command', :type => :aruba do
141
- before(:each) { run_command('cli') }
141
+ before(:each) { run_command('aruba-test-cli') }
142
142
  before(:each) { stop_all_commands }
143
143
 
144
144
  it { expect(sanitize_text(last_command_started.output)).to eq "Text" }
@@ -148,7 +148,7 @@ Feature: Sanitize text from output
148
148
  Then the specs should all pass
149
149
 
150
150
  Scenario: Output contains ansi escape codes prefixed by \033
151
- Given an executable named "bin/cli" with:
151
+ Given an executable named "bin/aruba-test-cli" with:
152
152
  """
153
153
  #!/bin/bash
154
154
  echo -n "\033[31mText"
@@ -158,7 +158,7 @@ Feature: Sanitize text from output
158
158
  require 'spec_helper'
159
159
 
160
160
  RSpec.describe 'Run command', :type => :aruba do
161
- before(:each) { run_command('cli') }
161
+ before(:each) { run_command('aruba-test-cli') }
162
162
  before(:each) { stop_all_commands }
163
163
 
164
164
  it { expect(sanitize_text(last_command_started.output)).to eq "Text" }
@@ -168,7 +168,7 @@ Feature: Sanitize text from output
168
168
  Then the specs should all pass
169
169
 
170
170
  Scenario: Output contains ansi escape codes prefixed by \e, but removable is disabled by configuration
171
- Given an executable named "bin/cli" with:
171
+ Given an executable named "bin/aruba-test-cli" with:
172
172
  """
173
173
  #!/bin/bash
174
174
  echo -n "\e[31mText"
@@ -178,7 +178,7 @@ Feature: Sanitize text from output
178
178
  require 'spec_helper'
179
179
 
180
180
  RSpec.describe 'Run command', :type => :aruba, :remove_ansi_escape_sequences => false, :keep_ansi => true do
181
- before(:each) { run_command('cli') }
181
+ before(:each) { run_command('aruba-test-cli') }
182
182
  before(:each) { stop_all_commands }
183
183
 
184
184
  it { expect(sanitize_text(last_command_started.output)).to eq "\e[31mText" }
@@ -188,7 +188,7 @@ Feature: Sanitize text from output
188
188
  Then the specs should all pass
189
189
 
190
190
  # Scenario: Output contains ansi escape code \016
191
- # Given an executable named "bin/cli" with:
191
+ # Given an executable named "bin/aruba-test-cli" with:
192
192
  # """
193
193
  # #!/bin/bash
194
194
  # echo -n "\016Text"
@@ -198,7 +198,7 @@ Feature: Sanitize text from output
198
198
  # require 'spec_helper'
199
199
  #
200
200
  # RSpec.describe 'Run command', :type => :aruba do
201
- # before(:each) { run_command('cli') }
201
+ # before(:each) { run_command('aruba-test-cli') }
202
202
  # before(:each) { stop_all_commands }
203
203
  #
204
204
  # it { expect(sanitize_text(last_command_started.output)).to eq "Text" }
@@ -208,7 +208,7 @@ Feature: Sanitize text from output
208
208
  # Then the specs should all pass
209
209
 
210
210
  # Scenario: Output contains ansi escape code \017
211
- # Given an executable named "bin/cli" with:
211
+ # Given an executable named "bin/aruba-test-cli" with:
212
212
  # """
213
213
  # #!/bin/bash
214
214
  # echo -n "\017Text"
@@ -218,7 +218,7 @@ Feature: Sanitize text from output
218
218
  # require 'spec_helper'
219
219
  #
220
220
  # RSpec.describe 'Run command', :type => :aruba do
221
- # before(:each) { run_command('cli') }
221
+ # before(:each) { run_command('aruba-test-cli') }
222
222
  # before(:each) { stop_all_commands }
223
223
  #
224
224
  # it { expect(sanitize_text(last_command_started.output)).to eq "Text" }
@@ -7,7 +7,7 @@ Feature: Unescape special characters in text
7
7
  Given I use a fixture named "cli-app"
8
8
 
9
9
  Scenario: Output contains \n
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
  echo -n 'text\ntext'
@@ -17,7 +17,7 @@ Feature: Unescape special characters in text
17
17
  require 'spec_helper'
18
18
 
19
19
  RSpec.describe 'Run command', :type => :aruba do
20
- before(:each) { run_command('cli') }
20
+ before(:each) { run_command('aruba-test-cli') }
21
21
  before(:each) { stop_all_commands }
22
22
 
23
23
  it { expect(unescape_text(last_command.output)).to eq "text\ntext" }
@@ -27,7 +27,7 @@ Feature: Unescape special characters in text
27
27
  Then the specs should all pass
28
28
 
29
29
  Scenario: Output contains \e
30
- Given an executable named "bin/cli" with:
30
+ Given an executable named "bin/aruba-test-cli" with:
31
31
  """
32
32
  #!/bin/bash
33
33
  echo -n 'text\etext'
@@ -37,7 +37,7 @@ Feature: Unescape special characters in text
37
37
  require 'spec_helper'
38
38
 
39
39
  RSpec.describe 'Run command', :type => :aruba do
40
- before(:each) { run_command('cli') }
40
+ before(:each) { run_command('aruba-test-cli') }
41
41
  before(:each) { stop_all_commands }
42
42
 
43
43
  it { expect(unescape_text(last_command.output)).to eq "texttext" }
@@ -47,7 +47,7 @@ Feature: Unescape special characters in text
47
47
  Then the specs should all pass
48
48
 
49
49
  Scenario: Output contains \"
50
- Given an executable named "bin/cli" with:
50
+ Given an executable named "bin/aruba-test-cli" with:
51
51
  """
52
52
  #!/bin/bash
53
53
  echo -n 'text\"text'
@@ -57,7 +57,7 @@ Feature: Unescape special characters in text
57
57
  require 'spec_helper'
58
58
 
59
59
  RSpec.describe 'Run command', :type => :aruba do
60
- before(:each) { run_command('cli') }
60
+ before(:each) { run_command('aruba-test-cli') }
61
61
  before(:each) { stop_all_commands }
62
62
 
63
63
  it { expect(unescape_text(last_command.output)).to eq "text\"text" }
@@ -67,7 +67,7 @@ Feature: Unescape special characters in text
67
67
  Then the specs should all pass
68
68
 
69
69
  Scenario: Output contains \033
70
- Given an executable named "bin/cli" with:
70
+ Given an executable named "bin/aruba-test-cli" with:
71
71
  """
72
72
  #!/bin/bash
73
73
  echo -n 'text\033text'
@@ -77,7 +77,7 @@ Feature: Unescape special characters in text
77
77
  require 'spec_helper'
78
78
 
79
79
  RSpec.describe 'Run command', :type => :aruba do
80
- before(:each) { run_command('cli') }
80
+ before(:each) { run_command('aruba-test-cli') }
81
81
  before(:each) { stop_all_commands }
82
82
 
83
83
  it { expect(unescape_text(last_command.output)).to eq "texttext" }
@@ -87,7 +87,7 @@ Feature: Unescape special characters in text
87
87
  Then the specs should all pass
88
88
 
89
89
  Scenario: Output contains \017
90
- Given an executable named "bin/cli" with:
90
+ Given an executable named "bin/aruba-test-cli" with:
91
91
  """
92
92
  #!/bin/bash
93
93
  echo -n 'text\017text'
@@ -97,7 +97,7 @@ Feature: Unescape special characters in text
97
97
  require 'spec_helper'
98
98
 
99
99
  RSpec.describe 'Run command', :type => :aruba do
100
- before(:each) { run_command('cli') }
100
+ before(:each) { run_command('aruba-test-cli') }
101
101
  before(:each) { stop_all_commands }
102
102
 
103
103
  it { expect(unescape_text(last_command.output)).to eq "texttext" }
@@ -107,7 +107,7 @@ Feature: Unescape special characters in text
107
107
  Then the specs should all pass
108
108
 
109
109
  Scenario: Output contains \016
110
- Given an executable named "bin/cli" with:
110
+ Given an executable named "bin/aruba-test-cli" with:
111
111
  """
112
112
  #!/bin/bash
113
113
  echo -n 'text\016text'
@@ -117,7 +117,7 @@ Feature: Unescape special characters in text
117
117
  require 'spec_helper'
118
118
 
119
119
  RSpec.describe 'Run command', :type => :aruba do
120
- before(:each) { run_command('cli') }
120
+ before(:each) { run_command('aruba-test-cli') }
121
121
  before(:each) { stop_all_commands }
122
122
 
123
123
  it { expect(unescape_text(last_command.output)).to eq "texttext" }