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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac7113c05858afc5a48b644bdb6e29427357319e13d6b7c5fb0c2a4d5afef4b
|
4
|
+
data.tar.gz: 463b5d14a0f1c0a2cbab30a5f51ab188916e077e8e00364d635353cdcb9346af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e525789f39d2f6cb13f178a174eae0c55a02ea8b8487353da9f075cc7dcab54498638ea101a7727bb9c87265d1232f711d9294988c81eb0de71408fa26113dde
|
7
|
+
data.tar.gz: 9604df096eb13935a3fe24114c9c381dc8cd0f3f749b01bcdde73e315dd1d8d23ba0dd819c0277517974b0a588788b787f9b648131a1a257a5cc954aea7ef966
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,54 +1,34 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
script: script/test
|
4
|
-
|
4
|
+
bundler_args: --without development debug
|
5
|
+
cache: bundler
|
6
|
+
|
5
7
|
rvm:
|
6
8
|
- 1.8.7
|
7
9
|
- 1.9.2
|
8
10
|
- 1.9.3
|
9
11
|
- 2.0.0
|
10
12
|
- 2.1.8
|
11
|
-
- 2.2
|
12
|
-
- 2.3
|
13
|
-
- 2.4
|
14
|
-
- 2.5
|
15
|
-
- 2.6
|
16
|
-
- jruby-1.7
|
17
|
-
- jruby-
|
18
|
-
- jruby-
|
19
|
-
-
|
13
|
+
- 2.2
|
14
|
+
- 2.3
|
15
|
+
- 2.4
|
16
|
+
- 2.5
|
17
|
+
- 2.6
|
18
|
+
- jruby-1.7
|
19
|
+
- jruby-9.0
|
20
|
+
- jruby-9.1
|
21
|
+
- jruby-9.2.6.0
|
22
|
+
- rbx-3
|
20
23
|
matrix:
|
21
24
|
include:
|
22
|
-
- rvm: jruby-
|
23
|
-
env: JRUBY_OPTS='--dev'
|
24
|
-
- rvm: jruby-9.0.1.0-20mode
|
25
|
-
env: JRUBY_OPTS='--dev'
|
26
|
-
- rvm: jruby-9.0.1.0-21mode
|
27
|
-
env: JRUBY_OPTS='--dev'
|
25
|
+
- rvm: jruby-1.7
|
26
|
+
env: JRUBY_OPTS='--dev --1.8'
|
28
27
|
allow_failures:
|
29
|
-
- rvm: rbx
|
30
|
-
- rvm: jruby-9.0.1.0
|
31
|
-
env: JRUBY_OPTS='--dev'
|
32
|
-
- rvm: jruby-9.0.1.0-20mode
|
33
|
-
env: JRUBY_OPTS='--dev'
|
34
|
-
- rvm: jruby-9.0.1.0-21mode
|
35
|
-
env: JRUBY_OPTS='--dev'
|
28
|
+
- rvm: rbx-3
|
36
29
|
branches:
|
37
30
|
only:
|
38
31
|
- master
|
39
32
|
- still
|
40
|
-
notifications:
|
41
|
-
email:
|
42
|
-
- cukes-devs@googlegroups.com
|
43
|
-
webhooks:
|
44
|
-
urls:
|
45
|
-
- https://webhooks.gitter.im/e/d4d9080e2a8c4910f609
|
46
33
|
env:
|
47
|
-
|
48
|
-
- secure: l8uznA5K4K9mZ1krmP3lTMD8WcJ32qGxFOR3jubKHcOBSLB4xSzU2aIqjyJdO+rLzebkwamhJc8pGSIWOUDQYvFiX7splK+uEkbBJ5huAhXtLF4Qgl86bCWbEXYzN7rvn0DQfpJAovyFMNRMnfo70XhwqWzFsaYa7Z0YbqYsJE4=
|
49
|
-
- JRUBY_OPTS='--dev'
|
50
|
-
cache: apt
|
51
|
-
addons:
|
52
|
-
apt:
|
53
|
-
packages:
|
54
|
-
- zsh
|
34
|
+
- JRUBY_OPTS='--dev'
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,24 @@ This project will adhere to [Semantic Versioning][1] once version 1.0.0 is relea
|
|
6
6
|
|
7
7
|
This document is formatted according to the principles of [Keep A CHANGELOG][2].
|
8
8
|
|
9
|
+
## [v0.14.10]
|
10
|
+
|
11
|
+
* Backport replacement of problematic AnsiColor module with simple
|
12
|
+
implementation ([#642])
|
13
|
+
* Undo preprecation of `#all_output`, `#all_stdout`, `#all_stderr` and
|
14
|
+
`#in_current_directory` API methods, as well as of checking the combined
|
15
|
+
output from all commands in cucumber steps ([#638])
|
16
|
+
* Warn when deprecated files `aruba/in_process` and `aruba/spawn_process` are
|
17
|
+
required ([#639])
|
18
|
+
* Backport allowing decimal timeout values ([#621])
|
19
|
+
* Move deprecated cucumber steps into a separate file ([#622])
|
20
|
+
* Backport renaming of bin/cli in features ([#620])
|
21
|
+
* Improve build set for CI ([#611])
|
22
|
+
* Make JRuby before :command helper hook work on the environment the command
|
23
|
+
will actually be run in ([#610], [#612])
|
24
|
+
* Reorganize spec files to match master branch ([#603])
|
25
|
+
* Reorganize feature files to match master branch ([#602])
|
26
|
+
|
9
27
|
## [v0.14.9]
|
10
28
|
|
11
29
|
* Formally deprecate `#use_clean_gemset` ([#597])
|
@@ -649,7 +667,18 @@ This document is formatted according to the principles of [Keep A CHANGELOG][2].
|
|
649
667
|
|
650
668
|
<!-- issues & pull requests -->
|
651
669
|
|
670
|
+
[#642]: https://github.com/cucumber/aruba/pull/642
|
671
|
+
[#639]: https://github.com/cucumber/aruba/pull/639
|
672
|
+
[#638]: https://github.com/cucumber/aruba/pull/638
|
673
|
+
[#622]: https://github.com/cucumber/aruba/pull/622
|
674
|
+
[#621]: https://github.com/cucumber/aruba/pull/621
|
675
|
+
[#620]: https://github.com/cucumber/aruba/pull/620
|
676
|
+
[#612]: https://github.com/cucumber/aruba/pull/612
|
677
|
+
[#611]: https://github.com/cucumber/aruba/pull/611
|
678
|
+
[#610]: https://github.com/cucumber/aruba/pull/610
|
652
679
|
[#604]: https://github.com/cucumber/aruba/pull/604
|
680
|
+
[#603]: https://github.com/cucumber/aruba/pull/603
|
681
|
+
[#602]: https://github.com/cucumber/aruba/pull/602
|
653
682
|
[#601]: https://github.com/cucumber/aruba/pull/601
|
654
683
|
[#597]: https://github.com/cucumber/aruba/pull/597
|
655
684
|
[#591]: https://github.com/cucumber/aruba/pull/591
|
@@ -831,6 +860,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG][2].
|
|
831
860
|
|
832
861
|
<!-- Releases -->
|
833
862
|
|
863
|
+
[v0.14.10]: https://github.com/cucumber/aruba/compare/v0.14.9...v0.14.10
|
834
864
|
[v0.14.9]: https://github.com/cucumber/aruba/compare/v0.14.8...v0.14.9
|
835
865
|
[v0.14.8]: https://github.com/cucumber/aruba/compare/v0.14.7...v0.14.8
|
836
866
|
[v0.14.7]: https://github.com/cucumber/aruba/compare/v0.14.6...v0.14.7
|
data/Gemfile
CHANGED
@@ -70,7 +70,7 @@ group :development, :test do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
# Code Coverage
|
73
|
-
gem 'simplecov', '~> 0.10'
|
73
|
+
gem 'simplecov', '~> 0.10' unless RUBY_PLATFORM.include?('java')
|
74
74
|
|
75
75
|
# Test api
|
76
76
|
gem 'rspec', '~> 3.4'
|
@@ -84,6 +84,12 @@ group :development, :test do
|
|
84
84
|
gem 'cucumber', '~> 2.0'
|
85
85
|
end
|
86
86
|
|
87
|
+
if RUBY_VERSION < '1.9.2'
|
88
|
+
gem 'childprocess', '~> 0.6.3'
|
89
|
+
else
|
90
|
+
gem 'childprocess', '~> 1.0.1'
|
91
|
+
end
|
92
|
+
|
87
93
|
if RUBY_VERSION < '1.9.2'
|
88
94
|
gem 'contracts', '~> 0.15.0'
|
89
95
|
else
|
@@ -99,5 +105,9 @@ group :development, :test do
|
|
99
105
|
gem 'cucumber-pro', '~> 0.0'
|
100
106
|
end
|
101
107
|
|
108
|
+
if RUBY_VERSION < '2.0.0'
|
109
|
+
gem 'ffi', '< 1.11.0'
|
110
|
+
end
|
111
|
+
|
102
112
|
gem 'minitest', '~> 5.8'
|
103
113
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
Feature: Cleanup Aruba Working Directory
|
2
2
|
|
3
|
-
By default Aruba removes its scratch directory before
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
cleaning up after itself.
|
3
|
+
By default Aruba removes its scratch directory *before* every scenario. This
|
4
|
+
isn't always the right thing to do, especially when the path to the default
|
5
|
+
directory has been changed. Use the `@no-clobber`-tag on your scenarios to
|
6
|
+
stop Aruba from cleaning up *before* it runs.
|
8
7
|
|
9
8
|
Background:
|
10
9
|
Given I use a fixture named "cli-app"
|
@@ -12,25 +12,25 @@ Feature: Run commands with Aruba
|
|
12
12
|
|
13
13
|
Background:
|
14
14
|
Given I use a fixture named "getting-started-app"
|
15
|
+
|
16
|
+
@requires-bash
|
17
|
+
Scenario: Bash Program
|
18
|
+
Given an executable named "bin/aruba-test-cli" with:
|
19
|
+
"""bash
|
20
|
+
#!/usr/bin/env bash
|
21
|
+
|
22
|
+
echo "Hello, Aruba!"
|
23
|
+
"""
|
15
24
|
And a file named "features/hello_aruba.feature" with:
|
16
25
|
"""
|
17
26
|
Feature: Getting Started With Aruba
|
18
27
|
Scenario: First Run of Command
|
19
|
-
Given I successfully run `cli`
|
28
|
+
Given I successfully run `aruba-test-cli`
|
20
29
|
Then the output should contain:
|
21
30
|
\"\"\"
|
22
31
|
Hello, Aruba!
|
23
32
|
\"\"\"
|
24
33
|
"""
|
25
|
-
|
26
|
-
@requires-bash
|
27
|
-
Scenario: Bash Program
|
28
|
-
Given an executable named "bin/cli" with:
|
29
|
-
"""bash
|
30
|
-
#!/usr/bin/env bash
|
31
|
-
|
32
|
-
echo "Hello, Aruba!"
|
33
|
-
"""
|
34
34
|
When I successfully run `cucumber`
|
35
35
|
Then the features should all pass
|
36
36
|
|
@@ -55,12 +55,22 @@ Feature: Run commands with Aruba
|
|
55
55
|
|
56
56
|
@requires-ruby
|
57
57
|
Scenario: Ruby Program
|
58
|
-
Given an executable named "bin/cli" with:
|
58
|
+
Given an executable named "bin/aruba-test-cli" with:
|
59
59
|
"""ruby
|
60
60
|
#!/usr/bin/env ruby
|
61
61
|
|
62
62
|
puts "Hello, Aruba!"
|
63
63
|
"""
|
64
|
+
And a file named "features/hello_aruba.feature" with:
|
65
|
+
"""
|
66
|
+
Feature: Getting Started With Aruba
|
67
|
+
Scenario: First Run of Command
|
68
|
+
Given I successfully run `aruba-test-cli`
|
69
|
+
Then the output should contain:
|
70
|
+
\"\"\"
|
71
|
+
Hello, Aruba!
|
72
|
+
\"\"\"
|
73
|
+
"""
|
64
74
|
When I successfully run `cucumber`
|
65
75
|
Then the features should all pass
|
66
76
|
|
@@ -85,12 +95,22 @@ Feature: Run commands with Aruba
|
|
85
95
|
|
86
96
|
@requires-python
|
87
97
|
Scenario: Python Program
|
88
|
-
Given an executable named "bin/cli" with:
|
98
|
+
Given an executable named "bin/aruba-test-cli" with:
|
89
99
|
"""python
|
90
100
|
#!/usr/bin/env python
|
91
101
|
|
92
102
|
print("Hello, Aruba!")
|
93
103
|
"""
|
104
|
+
And a file named "features/hello_aruba.feature" with:
|
105
|
+
"""
|
106
|
+
Feature: Getting Started With Aruba
|
107
|
+
Scenario: First Run of Command
|
108
|
+
Given I successfully run `aruba-test-cli`
|
109
|
+
Then the output should contain:
|
110
|
+
\"\"\"
|
111
|
+
Hello, Aruba!
|
112
|
+
\"\"\"
|
113
|
+
"""
|
94
114
|
When I successfully run `cucumber`
|
95
115
|
Then the features should all pass
|
96
116
|
|
@@ -115,12 +135,22 @@ Feature: Run commands with Aruba
|
|
115
135
|
|
116
136
|
@requires-perl
|
117
137
|
Scenario: Perl Program
|
118
|
-
Given an executable named "bin/cli" with:
|
138
|
+
Given an executable named "bin/aruba-test-cli" with:
|
119
139
|
"""perl
|
120
140
|
#!/usr/bin/env perl
|
121
141
|
|
122
142
|
print "Hello, Aruba!\n";
|
123
143
|
"""
|
144
|
+
And a file named "features/hello_aruba.feature" with:
|
145
|
+
"""
|
146
|
+
Feature: Getting Started With Aruba
|
147
|
+
Scenario: First Run of Command
|
148
|
+
Given I successfully run `aruba-test-cli`
|
149
|
+
Then the output should contain:
|
150
|
+
\"\"\"
|
151
|
+
Hello, Aruba!
|
152
|
+
\"\"\"
|
153
|
+
"""
|
124
154
|
When I successfully run `cucumber`
|
125
155
|
Then the features should all pass
|
126
156
|
|
@@ -160,7 +190,7 @@ Feature: Run commands with Aruba
|
|
160
190
|
}
|
161
191
|
}
|
162
192
|
\"\"\"
|
163
|
-
And I successfully run `javac tmp/HelloArubaApp.java`
|
193
|
+
And I successfully run `javac tmp/HelloArubaApp.java` for up to 20 seconds
|
164
194
|
And I cd to "tmp/"
|
165
195
|
And I successfully run `java HelloArubaApp`
|
166
196
|
Then the output should contain:
|
@@ -168,7 +198,7 @@ Feature: Run commands with Aruba
|
|
168
198
|
Hello, Aruba!
|
169
199
|
\"\"\"
|
170
200
|
"""
|
171
|
-
When I successfully run `cucumber`
|
201
|
+
When I successfully run `cucumber` for up to 21 seconds
|
172
202
|
Then the features should all pass
|
173
203
|
|
174
204
|
@requires-posix-standard-tools
|
data/features/{getting_started → 01_getting_started_with_aruba}/supported_testing_frameworks.feature
RENAMED
@@ -31,19 +31,11 @@ Feature: Supported Testing Frameworks
|
|
31
31
|
Then the features should all pass
|
32
32
|
|
33
33
|
Scenario: Use "aruba" with "RSpec"
|
34
|
-
Given a file named "spec/
|
35
|
-
"""
|
36
|
-
require 'aruba/rspec'
|
37
|
-
"""
|
38
|
-
And a file named "spec/spec_helper.rb" with:
|
34
|
+
Given a file named "spec/spec_helper.rb" with:
|
39
35
|
"""
|
40
36
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
41
37
|
|
42
|
-
|
43
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require File.join(File.dirname(f), File.basename(f, '.rb')) }
|
44
|
-
else
|
45
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
|
46
|
-
end
|
38
|
+
require 'aruba/rspec'
|
47
39
|
"""
|
48
40
|
And a file named "spec/use_aruba_with_rspec_spec.rb" with:
|
49
41
|
"""
|
@@ -63,19 +55,11 @@ Feature: Supported Testing Frameworks
|
|
63
55
|
|
64
56
|
|
65
57
|
Scenario: Use "aruba" with "Minitest"
|
66
|
-
Given a file named "test/
|
67
|
-
"""
|
68
|
-
require 'aruba/api'
|
69
|
-
"""
|
70
|
-
And a file named "test/test_helper.rb" with:
|
58
|
+
Given a file named "test/test_helper.rb" with:
|
71
59
|
"""
|
72
60
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
73
61
|
|
74
|
-
|
75
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require File.join(File.dirname(f), File.basename(f, '.rb')) }
|
76
|
-
else
|
77
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
|
78
|
-
end
|
62
|
+
require 'aruba/api'
|
79
63
|
"""
|
80
64
|
And a file named "test/use_aruba_with_minitest.rb" with:
|
81
65
|
"""
|
@@ -93,7 +77,7 @@ Feature: Supported Testing Frameworks
|
|
93
77
|
|
94
78
|
def getting_started_with_aruba
|
95
79
|
file = 'file.txt'
|
96
|
-
content = 'Hello World'
|
80
|
+
content = 'Hello World'
|
97
81
|
|
98
82
|
write_file file, content
|
99
83
|
read(file).must_equal [content]
|
data/features/{configuration → 02_configure_aruba}/activate_announcer_on_command_failure.feature
RENAMED
@@ -8,7 +8,7 @@ Feature: Configure announcer activation on command failure
|
|
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.activate_announcer_on_command_failure.inspect}")
|
@@ -21,7 +21,7 @@ Feature: Configure announcer activation on command failure
|
|
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.activate_announcer_on_command_failure = [:foo, :bar]
|
@@ -13,7 +13,7 @@ Feature: Usage of configuration
|
|
13
13
|
|
14
14
|
Background:
|
15
15
|
Given I use a fixture named "cli-app"
|
16
|
-
And an executable named "bin/cli" with:
|
16
|
+
And an executable named "bin/aruba-test-cli" with:
|
17
17
|
"""bash
|
18
18
|
#!/bin/bash
|
19
19
|
trap "exit 128" SIGTERM SIGINT
|
@@ -21,12 +21,10 @@ Feature: Usage of configuration
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Setting default values for option for RSpec
|
24
|
-
Given a file named "spec/support/
|
24
|
+
Given a file named "spec/support/aruba_config.rb" with:
|
25
25
|
"""ruby
|
26
|
-
require 'aruba/rspec'
|
27
|
-
|
28
26
|
Aruba.configure do |config|
|
29
|
-
config.exit_timeout = 1
|
27
|
+
config.exit_timeout = 0.1
|
30
28
|
end
|
31
29
|
"""
|
32
30
|
And a file named "spec/usage_configuration_spec.rb" with:
|
@@ -35,12 +33,12 @@ Feature: Usage of configuration
|
|
35
33
|
|
36
34
|
RSpec.describe 'Run command', :type => :aruba do
|
37
35
|
context 'when fast command' do
|
38
|
-
before(:each) { run_command('cli 0') }
|
36
|
+
before(:each) { run_command('aruba-test-cli 0') }
|
39
37
|
it { expect(last_command_started).to be_successfully_executed }
|
40
38
|
end
|
41
39
|
|
42
40
|
context 'when slow command' do
|
43
|
-
before(:each) { run_command('cli 2') }
|
41
|
+
before(:each) { run_command('aruba-test-cli 0.2') }
|
44
42
|
it { expect(last_command_started).not_to be_successfully_executed }
|
45
43
|
end
|
46
44
|
end
|
@@ -54,12 +52,10 @@ Feature: Usage of configuration
|
|
54
52
|
want to set the default timeout for all commands to the maximum value only
|
55
53
|
to prevent those commands from failing.
|
56
54
|
|
57
|
-
Given a file named "spec/support/
|
55
|
+
Given a file named "spec/support/aruba_config.rb" with:
|
58
56
|
"""ruby
|
59
|
-
require 'aruba/rspec'
|
60
|
-
|
61
57
|
Aruba.configure do |config|
|
62
|
-
config.exit_timeout = 1
|
58
|
+
config.exit_timeout = 0.1
|
63
59
|
end
|
64
60
|
"""
|
65
61
|
And a file named "spec/support/hooks.rb" with:
|
@@ -68,7 +64,7 @@ Feature: Usage of configuration
|
|
68
64
|
config.before :each do |example|
|
69
65
|
next unless example.metadata.key? :slow_command
|
70
66
|
|
71
|
-
aruba.config.exit_timeout =
|
67
|
+
aruba.config.exit_timeout = 0.3
|
72
68
|
end
|
73
69
|
end
|
74
70
|
"""
|
@@ -78,17 +74,17 @@ Feature: Usage of configuration
|
|
78
74
|
|
79
75
|
RSpec.describe 'Run command', :type => :aruba do
|
80
76
|
context 'when fast command' do
|
81
|
-
before(:each) { run_command('cli 0') }
|
77
|
+
before(:each) { run_command('aruba-test-cli 0') }
|
82
78
|
it { expect(last_command_started).to be_successfully_executed }
|
83
79
|
end
|
84
80
|
|
85
81
|
context 'when slow command and this is known by the developer', :slow_command => true do
|
86
|
-
before(:each) { run_command('cli 2') }
|
82
|
+
before(:each) { run_command('aruba-test-cli 0.2') }
|
87
83
|
it { expect(last_command_started).to be_successfully_executed }
|
88
84
|
end
|
89
85
|
|
90
86
|
context 'when slow command, but this might be a failure' do
|
91
|
-
before(:each) { run_command('cli 2') }
|
87
|
+
before(:each) { run_command('aruba-test-cli 0.2') }
|
92
88
|
it { expect(last_command_started).not_to be_successfully_executed }
|
93
89
|
end
|
94
90
|
end
|
@@ -97,23 +93,21 @@ Feature: Usage of configuration
|
|
97
93
|
Then the specs should all pass
|
98
94
|
|
99
95
|
Scenario: Setting default values for option for Cucumber
|
100
|
-
Given a file named "features/support/
|
96
|
+
Given a file named "features/support/aruba_config.rb" with:
|
101
97
|
"""ruby
|
102
|
-
require 'aruba/cucumber'
|
103
|
-
|
104
98
|
Aruba.configure do |config|
|
105
|
-
config.exit_timeout = 1
|
99
|
+
config.exit_timeout = 0.1
|
106
100
|
end
|
107
101
|
"""
|
108
102
|
And a file named "features/run.feature" with:
|
109
103
|
"""
|
110
104
|
Feature: Run it
|
111
105
|
Scenario: Fast command
|
112
|
-
When I run `cli 0`
|
106
|
+
When I run `aruba-test-cli 0`
|
113
107
|
Then the exit status should be 0
|
114
108
|
|
115
109
|
Scenario: Slow command
|
116
|
-
When I run `cli 2`
|
110
|
+
When I run `aruba-test-cli 0.2`
|
117
111
|
Then the exit status should be 128
|
118
112
|
"""
|
119
113
|
When I run `cucumber`
|
@@ -125,34 +119,32 @@ Feature: Usage of configuration
|
|
125
119
|
want to set the default timeout for all commands to the maximum value only
|
126
120
|
to prevent those commands from failing.
|
127
121
|
|
128
|
-
Given a file named "features/support/
|
122
|
+
Given a file named "features/support/aruba_config.rb" with:
|
129
123
|
"""ruby
|
130
|
-
require 'aruba/cucumber'
|
131
|
-
|
132
124
|
Aruba.configure do |config|
|
133
|
-
config.exit_timeout = 1
|
125
|
+
config.exit_timeout = 0.1
|
134
126
|
end
|
135
127
|
"""
|
136
128
|
And a file named "features/support/hooks.rb" with:
|
137
129
|
"""ruby
|
138
130
|
Before '@slow-command' do
|
139
|
-
aruba.config.exit_timeout =
|
131
|
+
aruba.config.exit_timeout = 0.3
|
140
132
|
end
|
141
133
|
"""
|
142
134
|
And a file named "features/usage_configuration.feature" with:
|
143
135
|
"""
|
144
136
|
Feature: Run it
|
145
137
|
Scenario: Fast command
|
146
|
-
When I run `cli 0`
|
138
|
+
When I run `aruba-test-cli 0`
|
147
139
|
Then the exit status should be 0
|
148
140
|
|
149
141
|
@slow-command
|
150
142
|
Scenario: Slow command known by the developer
|
151
|
-
When I run `cli 2`
|
143
|
+
When I run `aruba-test-cli 0.2`
|
152
144
|
Then the exit status should be 0
|
153
145
|
|
154
146
|
Scenario: Slow command which might be a failure
|
155
|
-
When I run `cli
|
147
|
+
When I run `aruba-test-cli 0.2`
|
156
148
|
Then the exit status should be 128
|
157
149
|
"""
|
158
150
|
When I run `cucumber`
|