aruba 0.14.9 → 0.14.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +17 -37
- data/CHANGELOG.md +30 -0
- data/Gemfile +11 -1
- data/features/{getting_started/cleanup.feature → 01_getting_started_with_aruba/cleanup_working_directory.feature} +4 -5
- data/features/{getting_started → 01_getting_started_with_aruba}/run_commands.feature +45 -15
- data/features/{getting_started → 01_getting_started_with_aruba}/supported_testing_frameworks.feature +5 -21
- data/features/{configuration → 02_configure_aruba}/activate_announcer_on_command_failure.feature +2 -2
- data/features/{configuration/usage.feature → 02_configure_aruba/basics.feature} +21 -29
- data/features/{configuration → 02_configure_aruba}/command_runtime_environment.feature +0 -0
- data/features/{configuration → 02_configure_aruba}/console_history_file.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/exit_timeout.feature +25 -17
- data/features/{configuration → 02_configure_aruba}/fixtures_directories.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/fixtures_path_prefix.feature +1 -1
- data/features/{configuration → 02_configure_aruba}/home_directory.feature +6 -6
- data/features/{configuration → 02_configure_aruba}/io_timeout.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/keep_ansi.feature +0 -0
- data/features/{configuration → 02_configure_aruba}/log_level.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/physical_block_size.feature +3 -3
- data/features/{configuration → 02_configure_aruba}/remove_ansi_escape_sequences.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/root_directory.feature +1 -1
- data/features/{configuration → 02_configure_aruba}/startup_wait_time.feature +2 -2
- data/features/{configuration → 02_configure_aruba}/working_directory.feature +9 -4
- data/features/{steps/core/announce.feature → 03_testing_frameworks/cucumber/announce_information_for_troubleshooting.feature} +20 -40
- data/features/{steps/environment → 03_testing_frameworks/cucumber}/disable_bunder.feature +0 -0
- data/features/{steps/command/exit_statuses.feature → 03_testing_frameworks/cucumber/steps/command/check_for_exit_statuses.feature} +20 -20
- data/features/{steps/command/output.feature → 03_testing_frameworks/cucumber/steps/command/check_output_of_command.feature} +58 -111
- data/features/{steps/command/stderr.feature → 03_testing_frameworks/cucumber/steps/command/check_stderr_of_command.feature} +1 -1
- data/features/{steps/command/stdout.feature → 03_testing_frameworks/cucumber/steps/command/check_stdout_of_command.feature} +6 -6
- data/features/{steps/command/debug.feature → 03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature} +6 -6
- data/features/{steps/command/run.feature → 03_testing_frameworks/cucumber/steps/command/run_a_command.feature} +4 -4
- data/features/{steps/command/in_process.feature → 03_testing_frameworks/cucumber/steps/command/run_command_in_process.feature} +2 -2
- data/features/{steps/command/interactive.feature → 03_testing_frameworks/cucumber/steps/command/run_command_interactively.feature} +2 -2
- data/features/03_testing_frameworks/cucumber/steps/command/run_commands_which_require_a_shell.feature +79 -0
- data/features/{steps/command/send_signal.feature → 03_testing_frameworks/cucumber/steps/command/send_signal_to_command.feature} +19 -40
- data/features/{steps/command/stop.feature → 03_testing_frameworks/cucumber/steps/command/stop_command.feature} +47 -75
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/append_environment_variable.feature +3 -3
- data/features/{steps/environment/home_variable.feature → 03_testing_frameworks/cucumber/steps/environment/modify_home_variable_for_testing.feature} +4 -4
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/prepend_environment_variable.feature +3 -3
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/environment/set_environment_variable.feature +3 -3
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/append_to_file.feature +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/cd_to_directory.feature +0 -0
- data/features/{steps/filesystem/existence_of_directory.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_directory.feature} +0 -0
- data/features/{steps/filesystem/existence_of_file.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_file.feature} +0 -0
- data/features/{steps/filesystem/file_content.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_file_content.feature} +57 -0
- data/features/{steps/filesystem/non_existence_of_directory.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_directory.feature} +0 -0
- data/features/{steps/filesystem/non_existence_of_file.feature → 03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_file.feature} +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/check_permissions_of_file.feature +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/compare_files.feature +0 -0
- data/features/{steps/filesystem/copy.feature → 03_testing_frameworks/cucumber/steps/filesystem/copy_file_or_directory.feature} +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/create_directory.feature +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/create_file.feature +0 -0
- data/features/{steps/filesystem/move.feature → 03_testing_frameworks/cucumber/steps/filesystem/move_file_or_directory.feature} +0 -1
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/overwrite_file.feature +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/remove_directory.feature +0 -0
- data/features/{steps → 03_testing_frameworks/cucumber/steps}/filesystem/remove_file.feature +0 -0
- data/features/{steps/filesystem/use_fixture.feature → 03_testing_frameworks/cucumber/steps/filesystem/use_fixtures_for_setup_test.feature} +0 -0
- data/features/{hooks/after/command.feature → 03_testing_frameworks/rspec/hooks/define_after_hook_for_commands.feature} +1 -4
- data/features/{hooks/before/command.feature → 03_testing_frameworks/rspec/hooks/define_before_hook_for_commands.feature} +1 -5
- data/features/{rspec/integration.feature → 03_testing_frameworks/rspec/setup_aruba_for_rspec.feature} +17 -17
- data/features/{api/command/find_command.feature → 04_aruba_api/command/find_a_started_command.feature} +0 -0
- data/features/{api/command/which.feature → 04_aruba_api/command/find_command_in_PATH.feature} +4 -4
- data/features/{api/command/stderr.feature → 04_aruba_api/command/read_stderr_of_command.feature} +8 -8
- data/features/{api/command/stdout.feature → 04_aruba_api/command/read_stdout_of_command.feature} +7 -7
- data/features/{api/command/run.feature → 04_aruba_api/command/run_command.feature} +53 -44
- data/features/{api → 04_aruba_api}/command/run_simple.feature +46 -34
- data/features/{api/command/send_signal.feature → 04_aruba_api/command/send_signal_to_command.feature} +8 -8
- data/features/{api → 04_aruba_api}/command/stop_all_commands.feature +18 -14
- data/features/{api/command/stop.feature → 04_aruba_api/command/stop_single_command.feature} +19 -18
- data/features/{api → 04_aruba_api}/command/terminate_all_commands.feature +16 -12
- data/features/{api/command/last_command_started.feature → 04_aruba_api/command/use_last_command_started.feature} +0 -0
- data/features/{api/command/last_command_stopped.feature → 04_aruba_api/command/use_last_command_stopped.feature} +2 -2
- data/features/{api → 04_aruba_api}/core/expand_path.feature +0 -0
- data/features/{api → 04_aruba_api}/environment/append_environment_variable.feature +0 -0
- data/features/{api → 04_aruba_api}/environment/delete_environment_variable.feature +0 -0
- data/features/{api → 04_aruba_api}/environment/prepend_environment_variable.feature +0 -0
- data/features/{api → 04_aruba_api}/environment/set_environment_variable.feature +0 -0
- data/features/{api/filesystem/cd.feature → 04_aruba_api/filesystem/cd_to_directory.feature} +0 -0
- data/features/{api/filesystem/does_exist.feature → 04_aruba_api/filesystem/check_existence_file_or_directory.feature} +0 -0
- data/features/{api/filesystem/is_absolute.feature → 04_aruba_api/filesystem/check_if_path_is_absolute.feature} +0 -0
- data/features/{api/filesystem/is_directory.feature → 04_aruba_api/filesystem/check_if_path_is_directory.feature} +0 -0
- data/features/{api/filesystem/is_file.feature → 04_aruba_api/filesystem/check_if_path_is_file.feature} +0 -0
- data/features/{api/filesystem/is_relative.feature → 04_aruba_api/filesystem/check_if_path_is_relative.feature} +0 -0
- data/features/{api → 04_aruba_api}/filesystem/create_directory.feature +0 -0
- data/features/{api/filesystem/move.feature → 04_aruba_api/filesystem/move_file_or_directory.feature} +0 -0
- data/features/{api/filesystem/disk_usage.feature → 04_aruba_api/filesystem/report_disk_usage.feature} +0 -0
- data/features/{api/filesystem/fixtures.feature → 04_aruba_api/filesystem/use_fixtures.feature} +0 -0
- data/features/{api → 04_aruba_api}/text/extract_text.feature +8 -8
- data/features/{api → 04_aruba_api}/text/replace_variables.feature +2 -2
- data/features/{api → 04_aruba_api}/text/sanitize_text.feature +22 -22
- data/features/{api → 04_aruba_api}/text/unescape_text.feature +12 -12
- data/features/{matchers/timeouts.feature → 05_use_rspec_matchers/command/check_timeouts.feature} +4 -4
- data/features/{matchers → 05_use_rspec_matchers}/directory/have_sub_directory.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/file/be_a_command_found_in_path.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/file/be_existing_executable.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/file/be_existing_file.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/file/have_file_content.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/file/have_file_size.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/path/be_an_absolute_path.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/path/be_an_existing_path.feature +0 -0
- data/features/{matchers → 05_use_rspec_matchers}/path/have_permissions.feature +4 -4
- data/features/{cli/init.feature → 06_use_aruba_cli/initialize_project_with_aruba.feature} +0 -0
- data/features/{cli/console.feature → 06_use_aruba_cli/open_console.feature} +0 -0
- data/features/08_other/improve_performance_if_using_jruby.feature +37 -0
- data/features/step_definitions/hooks.rb +0 -10
- data/features/support/env.rb +1 -1
- data/features/support/simplecov_setup.rb +9 -6
- data/fixtures/cli-app/bin/{cli → aruba-test-cli} +0 -0
- data/fixtures/cli-app/spec/spec_helper.rb +1 -0
- data/fixtures/empty-app/lib/cli/app.rb +0 -6
- data/lib/aruba/api/commands.rb +24 -0
- data/lib/aruba/api/core.rb +9 -2
- data/lib/aruba/api/deprecated.rb +2 -73
- data/lib/aruba/api/filesystem.rb +1 -1
- data/lib/aruba/colorizer.rb +10 -99
- data/lib/aruba/config/jruby.rb +15 -5
- data/lib/aruba/cucumber.rb +1 -0
- data/lib/aruba/cucumber/command.rb +63 -93
- data/lib/aruba/cucumber/deprecated.rb +93 -0
- data/lib/aruba/cucumber/file.rb +0 -12
- data/lib/aruba/cucumber/hooks.rb +0 -44
- data/lib/aruba/in_process.rb +2 -0
- data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
- data/lib/aruba/platforms/announcer.rb +1 -1
- data/lib/aruba/platforms/command_monitor.rb +0 -3
- data/lib/aruba/processes/spawn_process.rb +17 -5
- data/lib/aruba/spawn_process.rb +4 -1
- data/lib/aruba/version.rb +1 -1
- data/script/bootstrap +0 -4
- data/spec/aruba/api/core_spec.rb +142 -0
- data/spec/aruba/api/deprecated_spec.rb +113 -0
- data/spec/aruba/api/filesystem_spec.rb +746 -0
- data/spec/aruba/api_spec.rb +1 -885
- data/spec/aruba/jruby_spec.rb +46 -28
- data/spec/aruba/{spawn_process_spec.rb → processes/spawn_process_spec.rb} +18 -2
- data/spec/spec_helper.rb +5 -3
- metadata +108 -115
- data/features/development/build.feature +0 -15
- data/features/getting_started/writing_good_feature_tests.feature +0 -38
- data/features/matchers/collection/include_an_object.feature +0 -72
- data/features/platforms/jruby.feature +0 -14
- data/features/step_definitions/aruba_dev_steps.rb +0 -56
- data/features/steps/command/shell.feature +0 -155
- data/features/steps/filesystem/check_file_content.feature +0 -61
- data/features/steps/filesystem/fixtures.feature +0 -64
- data/features/steps/overview.feature +0 -25
- data/spec/aruba/api/environment/restore_env_spec.rb +0 -86
- data/spec/aruba/api/environment/set_env_spec.rb +0 -46
- data/spec/aruba/api/filesystem/file_size_spec.rb +0 -28
File without changes
|
@@ -8,7 +8,7 @@ Feature: Configure the aruba console history file
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.console_history_file}")
|
@@ -21,7 +21,7 @@ Feature: Configure the aruba console history file
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Set some value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.console_history_file = '~/.config/aruba/history.txt'
|
@@ -6,9 +6,15 @@ Feature: Configure timeout for command execution
|
|
6
6
|
|
7
7
|
Background:
|
8
8
|
Given I use the fixture "cli-app"
|
9
|
+
And an executable named "bin/aruba-test-cli" with:
|
10
|
+
"""bash
|
11
|
+
#!/bin/bash
|
12
|
+
trap "exit 128" SIGTERM SIGINT
|
13
|
+
sleep $*
|
14
|
+
"""
|
9
15
|
|
10
16
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
17
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
18
|
"""ruby
|
13
19
|
Aruba.configure do |config|
|
14
20
|
puts %(The default value is "#{config.exit_timeout}")
|
@@ -21,32 +27,34 @@ Feature: Configure timeout for command execution
|
|
21
27
|
"""
|
22
28
|
|
23
29
|
Scenario: Modify value
|
24
|
-
Given
|
25
|
-
"""bash
|
26
|
-
#!/bin/bash
|
27
|
-
sleep 1
|
28
|
-
"""
|
29
|
-
And a file named "features/support/aruba.rb" with:
|
30
|
+
Given a file named "features/support/aruba_config.rb" with:
|
30
31
|
"""ruby
|
31
32
|
Aruba.configure do |config|
|
32
|
-
config.exit_timeout = 2
|
33
|
+
config.exit_timeout = 0.2
|
33
34
|
end
|
34
35
|
"""
|
35
|
-
And
|
36
|
+
And a file named "features/run.feature" with:
|
37
|
+
"""
|
38
|
+
Feature: Run it
|
39
|
+
Scenario: Fast command
|
40
|
+
When I run `aruba-test-cli 0.1`
|
41
|
+
Then the exit status should be 0
|
42
|
+
"""
|
36
43
|
Then I successfully run `cucumber`
|
37
44
|
|
38
45
|
Scenario: Fails if takes longer
|
39
|
-
Given
|
40
|
-
"""ruby
|
41
|
-
#!/bin/bash
|
42
|
-
sleep 2
|
43
|
-
"""
|
44
|
-
And a file named "features/support/aruba.rb" with:
|
46
|
+
Given a file named "features/support/aruba_config.rb" with:
|
45
47
|
"""ruby
|
46
48
|
Aruba.configure do |config|
|
47
|
-
config.exit_timeout = 1
|
49
|
+
config.exit_timeout = 0.1
|
48
50
|
end
|
49
51
|
"""
|
50
|
-
And
|
52
|
+
And a file named "features/run.feature" with:
|
53
|
+
"""
|
54
|
+
Feature: Run it
|
55
|
+
Scenario: Fast command
|
56
|
+
When I run `aruba-test-cli 0.2`
|
57
|
+
Then the exit status should be 0
|
58
|
+
"""
|
51
59
|
Then I run `cucumber`
|
52
60
|
And the exit status should be 1
|
@@ -8,7 +8,7 @@ Feature: Configure directory where to look for fixtures
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "%w(#{config.fixtures_directories.join(" ")})")
|
@@ -21,7 +21,7 @@ Feature: Configure directory where to look for fixtures
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.fixtures_directories = %w(spec/fixtures)
|
@@ -8,7 +8,7 @@ Feature: Use fixtures path prefix of aruba
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts "The prefix is \"#{config.fixtures_path_prefix}\"."
|
@@ -13,7 +13,7 @@ Feature: Configure the home directory to be used with aruba
|
|
13
13
|
Given I use the fixture "cli-app"
|
14
14
|
|
15
15
|
Scenario: Default value
|
16
|
-
Given a file named "features/support/
|
16
|
+
Given a file named "features/support/aruba_config.rb" with:
|
17
17
|
"""ruby
|
18
18
|
Aruba.configure do |config|
|
19
19
|
puts %(The default value is "#{config.home_directory}")
|
@@ -26,7 +26,7 @@ Feature: Configure the home directory to be used with aruba
|
|
26
26
|
"""
|
27
27
|
|
28
28
|
Scenario: Set to current working directory
|
29
|
-
Given a file named "features/support/
|
29
|
+
Given a file named "features/support/aruba_config.rb" with:
|
30
30
|
"""ruby
|
31
31
|
Aruba.configure do |config|
|
32
32
|
# use current working directory
|
@@ -44,7 +44,7 @@ Feature: Configure the home directory to be used with aruba
|
|
44
44
|
"""
|
45
45
|
|
46
46
|
Scenario: Set to aruba's working directory
|
47
|
-
Given a file named "features/support/
|
47
|
+
Given a file named "features/support/aruba_config.rb" with:
|
48
48
|
"""ruby
|
49
49
|
Aruba.configure do |config|
|
50
50
|
# Use aruba working directory
|
@@ -56,13 +56,13 @@ Feature: Configure the home directory to be used with aruba
|
|
56
56
|
end
|
57
57
|
"""
|
58
58
|
Then I successfully run `cucumber`
|
59
|
-
Then the output should
|
59
|
+
Then the output should match:
|
60
60
|
"""
|
61
|
-
The default value is "/
|
61
|
+
The default value is "/.*/tmp/aruba"
|
62
62
|
"""
|
63
63
|
|
64
64
|
Scenario: Set to some other path (deprecated)
|
65
|
-
Given a file named "features/support/
|
65
|
+
Given a file named "features/support/aruba_config.rb" with:
|
66
66
|
"""ruby
|
67
67
|
Aruba.configure do |config|
|
68
68
|
# use current working directory
|
@@ -8,7 +8,7 @@ Feature: Configure timeout for io of commands
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.io_wait_timeout}")
|
@@ -21,7 +21,7 @@ Feature: Configure timeout for io of commands
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.io_wait_timeout = 2
|
File without changes
|
@@ -8,7 +8,7 @@ Feature: Configure Log level of aruba logger
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.log_level}")
|
@@ -21,7 +21,7 @@ Feature: Configure Log level of aruba logger
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.log_level = :warn
|
@@ -8,7 +8,7 @@ Feature: Configure the phsical block size of disk
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.physical_block_size}")
|
@@ -21,7 +21,7 @@ Feature: Configure the phsical block size of disk
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Set the block size to something else which is a power of two
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
# use current working directory
|
@@ -39,7 +39,7 @@ Feature: Configure the phsical block size of disk
|
|
39
39
|
"""
|
40
40
|
|
41
41
|
Scenario: The value needs to be a power of two, otherwise it will fail
|
42
|
-
Given a file named "features/support/
|
42
|
+
Given a file named "features/support/aruba_config.rb" with:
|
43
43
|
"""ruby
|
44
44
|
Aruba.configure do |config|
|
45
45
|
config.physical_block_size = 3
|
@@ -8,7 +8,7 @@ Feature: Configure if ansi color codes should be stripped off from command outpu
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.remove_ansi_escape_sequences}")
|
@@ -21,7 +21,7 @@ Feature: Configure if ansi color codes should be stripped off from command outpu
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.remove_ansi_escape_sequences = false
|
@@ -8,7 +8,7 @@ Feature: Use root directory of aruba
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default configuration
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts config.root_directory
|
@@ -18,7 +18,7 @@ Feature: Set time to wait after spawning command
|
|
18
18
|
Given I use the fixture "cli-app"
|
19
19
|
|
20
20
|
Scenario: Default value
|
21
|
-
Given a file named "features/support/
|
21
|
+
Given a file named "features/support/aruba_config.rb" with:
|
22
22
|
"""ruby
|
23
23
|
Aruba.configure do |config|
|
24
24
|
puts %(The default value is "#{config.startup_wait_time}")
|
@@ -31,7 +31,7 @@ Feature: Set time to wait after spawning command
|
|
31
31
|
"""
|
32
32
|
|
33
33
|
Scenario: Modify value
|
34
|
-
Given a file named "features/support/
|
34
|
+
Given a file named "features/support/aruba_config.rb" with:
|
35
35
|
"""ruby
|
36
36
|
Aruba.configure do |config|
|
37
37
|
config.startup_wait_time = 2
|
@@ -8,7 +8,7 @@ Feature: Configure working directory of aruba
|
|
8
8
|
Given I use the fixture "cli-app"
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
|
-
Given a file named "features/support/
|
11
|
+
Given a file named "features/support/aruba_config.rb" with:
|
12
12
|
"""
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.working_directory}")
|
@@ -21,13 +21,18 @@ Feature: Configure working directory of aruba
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
|
-
Given a file named "features/support/
|
24
|
+
Given a file named "features/support/aruba_config.rb" with:
|
25
25
|
"""
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.working_directory = 'tmp/cucumber'
|
28
28
|
end
|
29
29
|
"""
|
30
|
-
And
|
31
|
-
|
30
|
+
And a file named "features/run.feature" with:
|
31
|
+
"""
|
32
|
+
Feature: Run it
|
33
|
+
Scenario: Fast command
|
34
|
+
When I run `echo "Hello"`
|
35
|
+
Then the exit status should be 0
|
36
|
+
"""
|
32
37
|
When I successfully run `cucumber`
|
33
38
|
Then a directory named "tmp/cucumber" should exist
|
@@ -7,26 +7,6 @@ Feature: Announce output during test run
|
|
7
7
|
Background:
|
8
8
|
Given I use a fixture named "cli-app"
|
9
9
|
|
10
|
-
Scenario: Announce change of directory (deprecated)
|
11
|
-
Given a file named "features/exit_status.feature" with:
|
12
|
-
"""cucumber
|
13
|
-
Feature: Announce
|
14
|
-
@announce-dir
|
15
|
-
Scenario: Run command
|
16
|
-
Given a directory named "dir.d"
|
17
|
-
When I cd to "dir.d"
|
18
|
-
"""
|
19
|
-
When I run `cucumber`
|
20
|
-
Then the features should all pass
|
21
|
-
And the output should contain:
|
22
|
-
"""
|
23
|
-
$ cd /
|
24
|
-
"""
|
25
|
-
And the output should contain:
|
26
|
-
"""
|
27
|
-
tmp/aruba/dir.d
|
28
|
-
"""
|
29
|
-
|
30
10
|
Scenario: Announce change of directory
|
31
11
|
Given a file named "features/exit_status.feature" with:
|
32
12
|
"""cucumber
|
@@ -48,7 +28,7 @@ Feature: Announce output during test run
|
|
48
28
|
"""
|
49
29
|
|
50
30
|
Scenario: Announce stdout
|
51
|
-
Given an executable named "bin/cli" with:
|
31
|
+
Given an executable named "bin/aruba-test-cli" with:
|
52
32
|
"""bash
|
53
33
|
#!/usr/bin/env bash
|
54
34
|
|
@@ -59,7 +39,7 @@ Feature: Announce output during test run
|
|
59
39
|
Feature: Announce
|
60
40
|
@announce-stdout
|
61
41
|
Scenario: Run command
|
62
|
-
When I run `cli`
|
42
|
+
When I run `aruba-test-cli`
|
63
43
|
Then the exit status should be 0
|
64
44
|
"""
|
65
45
|
When I run `cucumber`
|
@@ -73,7 +53,7 @@ Feature: Announce output during test run
|
|
73
53
|
"""
|
74
54
|
|
75
55
|
Scenario: Announce stderr
|
76
|
-
Given an executable named "bin/cli" with:
|
56
|
+
Given an executable named "bin/aruba-test-cli" with:
|
77
57
|
"""bash
|
78
58
|
#!/usr/bin/env bash
|
79
59
|
|
@@ -84,7 +64,7 @@ Feature: Announce output during test run
|
|
84
64
|
Feature: Announce
|
85
65
|
@announce-stderr
|
86
66
|
Scenario: Run command
|
87
|
-
When I run `cli`
|
67
|
+
When I run `aruba-test-cli`
|
88
68
|
Then the exit status should be 0
|
89
69
|
"""
|
90
70
|
When I run `cucumber`
|
@@ -98,7 +78,7 @@ Feature: Announce output during test run
|
|
98
78
|
"""
|
99
79
|
|
100
80
|
Scenario: Announce both stderr and stdout
|
101
|
-
Given an executable named "bin/cli" with:
|
81
|
+
Given an executable named "bin/aruba-test-cli" with:
|
102
82
|
"""bash
|
103
83
|
#!/usr/bin/env bash
|
104
84
|
|
@@ -110,7 +90,7 @@ Feature: Announce output during test run
|
|
110
90
|
Feature: Announce
|
111
91
|
@announce-output
|
112
92
|
Scenario: Run command
|
113
|
-
When I run `cli`
|
93
|
+
When I run `aruba-test-cli`
|
114
94
|
Then the exit status should be 0
|
115
95
|
"""
|
116
96
|
When I run `cucumber`
|
@@ -131,7 +111,7 @@ Feature: Announce output during test run
|
|
131
111
|
"""
|
132
112
|
|
133
113
|
Scenario: Announce command
|
134
|
-
Given an executable named "bin/cli" with:
|
114
|
+
Given an executable named "bin/aruba-test-cli" with:
|
135
115
|
"""bash
|
136
116
|
#!/usr/bin/env bash
|
137
117
|
|
@@ -140,20 +120,20 @@ Feature: Announce output during test run
|
|
140
120
|
And a file named "features/exit_status.feature" with:
|
141
121
|
"""cucumber
|
142
122
|
Feature: Announce
|
143
|
-
@announce-
|
123
|
+
@announce-command
|
144
124
|
Scenario: Run command
|
145
|
-
When I run `cli`
|
125
|
+
When I run `aruba-test-cli`
|
146
126
|
Then the exit status should be 0
|
147
127
|
"""
|
148
128
|
When I run `cucumber`
|
149
129
|
Then the features should all pass
|
150
130
|
And the output should contain:
|
151
131
|
"""
|
152
|
-
$ cli
|
132
|
+
$ aruba-test-cli
|
153
133
|
"""
|
154
134
|
|
155
135
|
Scenario: Announce change of environment variable
|
156
|
-
Given an executable named "bin/cli" with:
|
136
|
+
Given an executable named "bin/aruba-test-cli" with:
|
157
137
|
"""bash
|
158
138
|
#!/usr/bin/env bash
|
159
139
|
|
@@ -162,12 +142,12 @@ Feature: Announce output during test run
|
|
162
142
|
And a file named "features/exit_status.feature" with:
|
163
143
|
"""cucumber
|
164
144
|
Feature: Announce
|
165
|
-
@announce-
|
145
|
+
@announce-changed-environment
|
166
146
|
Scenario: Run command
|
167
147
|
When I set the environment variables to:
|
168
148
|
| variable | value |
|
169
149
|
| MY_VAR | my_value |
|
170
|
-
And I run `cli`
|
150
|
+
And I run `aruba-test-cli`
|
171
151
|
Then the exit status should be 0
|
172
152
|
"""
|
173
153
|
When I run `cucumber`
|
@@ -178,7 +158,7 @@ Feature: Announce output during test run
|
|
178
158
|
"""
|
179
159
|
|
180
160
|
Scenario: Announce change of environment variable which contains special characters
|
181
|
-
Given an executable named "bin/cli" with:
|
161
|
+
Given an executable named "bin/aruba-test-cli" with:
|
182
162
|
"""bash
|
183
163
|
#!/usr/bin/env bash
|
184
164
|
|
@@ -187,12 +167,12 @@ Feature: Announce output during test run
|
|
187
167
|
And a file named "features/exit_status.feature" with:
|
188
168
|
"""cucumber
|
189
169
|
Feature: Announce
|
190
|
-
@announce-
|
170
|
+
@announce-changed-environment
|
191
171
|
Scenario: Run command
|
192
172
|
When I set the environment variables to:
|
193
173
|
| variable | value |
|
194
174
|
| MY_VAR | my value ! |
|
195
|
-
And I run `cli`
|
175
|
+
And I run `aruba-test-cli`
|
196
176
|
Then the exit status should be 0
|
197
177
|
"""
|
198
178
|
When I run `cucumber`
|
@@ -206,7 +186,7 @@ Feature: Announce output during test run
|
|
206
186
|
This will output information like owner, group, atime, mtime, ctime, size,
|
207
187
|
mode and if command is executable.
|
208
188
|
|
209
|
-
Given an executable named "bin/cli" with:
|
189
|
+
Given an executable named "bin/aruba-test-cli" with:
|
210
190
|
"""bash
|
211
191
|
#!/usr/bin/env bash
|
212
192
|
|
@@ -217,7 +197,7 @@ Feature: Announce output during test run
|
|
217
197
|
Feature: Announce
|
218
198
|
@announce-command-filesystem-status
|
219
199
|
Scenario: Run command
|
220
|
-
And I run `cli`
|
200
|
+
And I run `aruba-test-cli`
|
221
201
|
Then the exit status should be 0
|
222
202
|
"""
|
223
203
|
When I run `cucumber`
|
@@ -259,7 +239,7 @@ Feature: Announce output during test run
|
|
259
239
|
This will output the content of the executable command. Be careful doing
|
260
240
|
this with binary executables. This hook should be used with scripts only.
|
261
241
|
|
262
|
-
Given an executable named "bin/cli" with:
|
242
|
+
Given an executable named "bin/aruba-test-cli" with:
|
263
243
|
"""bash
|
264
244
|
#!/usr/bin/env bash
|
265
245
|
|
@@ -270,7 +250,7 @@ Feature: Announce output during test run
|
|
270
250
|
Feature: Announce
|
271
251
|
@announce-command-content
|
272
252
|
Scenario: Run command
|
273
|
-
And I run `cli`
|
253
|
+
And I run `aruba-test-cli`
|
274
254
|
Then the exit status should be 0
|
275
255
|
"""
|
276
256
|
When I run `cucumber`
|