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
@@ -1,72 +0,0 @@
1
- Feature: `include_an_object` Matcher
2
-
3
- Use the `include_an_object` matcher to specify that a collection's objects include_an_object pass an expected matcher.
4
- This works on include_an_object enumerable object.
5
-
6
- ```ruby
7
- expect([1, 4, 5]).to include_an_object( be_odd )
8
- expect([1, 3, 'a']).to include_an_object( be_an(Integer) )
9
- expect([1, 3, 11]).to include_an_object( be < 10 )
10
- ```
11
-
12
- The matcher also supports compound matchers:
13
-
14
- ```ruby
15
- expect([1, 'a', 11]).to include_an_object( be_odd.and be < 10 )
16
- ```
17
-
18
- Background:
19
- Given I use a fixture named "cli-app"
20
-
21
- Scenario: Array usage
22
- Given a file named "spec/array_include_an_object_matcher_spec.rb" with:
23
- """ruby
24
- require 'spec_helper'
25
-
26
- RSpec.describe [1, 4, 'a', 11] do
27
- it { is_expected.to include_an_object( be_odd ) }
28
- it { is_expected.to include_an_object( be_an(Integer) ) }
29
- it { is_expected.to include_an_object( be < 10 ) }
30
- it { is_expected.not_to include_an_object( eq 'b' ) }
31
- end
32
-
33
- RSpec.describe [14, 'a'] do
34
- it { is_expected.to include_an_object( be_odd ) }
35
- it { is_expected.to include_an_object( be_an(Symbol) ) }
36
- it { is_expected.to include_an_object( be < 10 ) }
37
- it { is_expected.not_to include_an_object( eq 'a' ) }
38
- end
39
- """
40
- When I run `rspec`
41
- Then the output should contain all of these lines:
42
- | 8 examples, 4 failures |
43
- | expected [14, "a"] to include an object be odd |
44
- | expected [14, "a"] to include an object be a kind of Symbol |
45
- | expected [14, "a"] to include an object be < 10 |
46
- | expected [14, "a"] not to include an object eq "a" |
47
-
48
- Scenario: Compound Matcher Usage
49
- Given a file named "spec/compound_include_an_object_matcher_spec.rb" with:
50
- """ruby
51
- require 'spec_helper'
52
-
53
- RSpec.describe [1, 'anything', 'something'] do
54
- it { is_expected.to include_an_object( be_a(String).and include("thing") ) }
55
- it { is_expected.to include_an_object( be_a(String).and end_with("g") ) }
56
- it { is_expected.to include_an_object( start_with("s").or include("y") ) }
57
- it { is_expected.not_to include_an_object( start_with("b").or include("b") ) }
58
- end
59
-
60
- RSpec.describe ['anything', 'something'] do
61
- it { is_expected.to include_an_object( be_a(Integer).and include("thing") ) }
62
- it { is_expected.to include_an_object( be_a(Integer).and end_with("z") ) }
63
- it { is_expected.to include_an_object( start_with("z").or include("1") ) }
64
- it { is_expected.not_to include_an_object( start_with("a").or include("some") ) }
65
- end
66
- """
67
- When I run `rspec`
68
- Then the output should contain all of these lines:
69
- | 8 examples, 4 failures |
70
- | expected ["anything", "something"] to include an object be a kind of Integer and include "thing" |
71
- | expected ["anything", "something"] to include an object be a kind of Integer and end with "z" |
72
- | expected ["anything", "something"] to include an object start with "z" or include "1" |
@@ -1,14 +0,0 @@
1
- Feature: Support for JRuby
2
-
3
- Improve startup time by disabling JIT and forcing client JVM mode. This can
4
- be accomplished by adding
5
-
6
- ```ruby
7
- require 'aruba/jruby'
8
- ```
9
-
10
- *Note* - no conflict resolution on the JAVA/JRuby environment options is
11
- done; only merging. For more complex settings please manually set the
12
- environment variables in the hook or externally.
13
-
14
- Refer to http://blog.headius.com/2010/03/jruby-startup-time-tips.html for other tips on startup time.
@@ -1,56 +0,0 @@
1
- When /^I do aruba (.*)$/ do |aruba_step|
2
- @aruba_exception = StandardError.new
3
-
4
- begin
5
- step(aruba_step)
6
- rescue => e
7
- @aruba_exception = e
8
- end
9
- end
10
-
11
- # Useful for debugging timing problems
12
- When /^sleep (\d+)$/ do |time|
13
- sleep time.to_i
14
- end
15
-
16
- When /^I set env variable "(\w+)" to "([^"]*)"$/ do |var, value|
17
- ENV[var] = value
18
- end
19
-
20
- Then /^aruba should fail with "([^"]*)"$/ do |error_message|
21
- expect(@aruba_exception.message).to include sanitize_text(error_message)
22
- end
23
-
24
- Then /^the following step should fail with Spec::Expectations::ExpectationNotMetError:$/ do |multiline_step|
25
- expect{steps multiline_step.to_s}.to raise_error(RSpec::Expectations::ExpectationNotMetError)
26
- end
27
-
28
- Given(/^the default executable$/) do
29
- step 'an executable named "bin/cli" with:', <<-EOS
30
- #!/usr/bin/env ruby
31
-
32
- $LOAD_PATH << File.expand_path('../../lib', __FILE__)
33
- require 'cli/app'
34
-
35
- exit 0
36
- EOS
37
- end
38
-
39
- Given(/^the default feature-test$/) do
40
- step(
41
- 'a file named "features/default.feature" with:',
42
- <<-EOS.strip_heredoc
43
- Feature: Default Feature
44
-
45
- This is the default feature
46
-
47
- Scenario: Run command
48
- Given I successfully run `cli`
49
- EOS
50
- )
51
- end
52
-
53
- Then(/^aruba should be installed on the local system$/) do
54
- run_command('gem list aruba')
55
- expect(last_command_started).to have_output(/aruba/)
56
- end
@@ -1,155 +0,0 @@
1
- Feature: Running shell commands
2
-
3
- You can run an *ad hoc* script with the following steps:
4
- - `When I run the following script:`
5
-
6
- Or you can run shell commands with:
7
- - `I run the following (bash|zsh|...shell)? commands`
8
- - `I run the following (bash|zsh|...shell)? commands (in|with) \`interpreter\``
9
- - `I run the following (bash|zsh|...shell)? commands (in|with) \`/path/to/interpreter\``
10
-
11
- Background:
12
- Given I use a fixture named "cli-app"
13
-
14
- Scenario: Creating and running scripts
15
- Given a file named "features/shell.feature" with:
16
- """
17
- Feature: Running scripts
18
- Scenario: Running ruby script
19
- When I run the following script:
20
- \"\"\"bash
21
- #!/usr/bin/env ruby
22
-
23
- puts "Hello"
24
- \"\"\"
25
- Then the output should contain "Hello"
26
-
27
- Scenario: Running python script
28
- When I run the following script:
29
- \"\"\"bash
30
- #!/usr/bin/env python
31
-
32
- print("Hello")
33
- \"\"\"
34
- Then the output should contain exactly "Hello"
35
- """
36
- When I run `cucumber`
37
- Then the features should all pass
38
-
39
- Scenario: Running shell commands
40
- Given a file named "features/shell.feature" with:
41
- """
42
- Feature: Running scripts
43
- Scenario: Running shell commands
44
- When I run the following commands:
45
- \"\"\"bash
46
- echo "Hello shell"
47
- \"\"\"
48
- Then the output should contain exactly "Hello shell"
49
- """
50
- When I run `cucumber`
51
- Then the features should all pass
52
-
53
- Scenario: Running bash commands
54
- Given a file named "features/shell.feature" with:
55
- """
56
- Feature: Running scripts
57
- Scenario: Running bash commands
58
- When I run the following commands with `bash`:
59
- \"\"\"bash
60
- echo -n "Hello "
61
- echo `echo bash` # subshell
62
- \"\"\"
63
- Then the output should contain exactly "Hello bash"
64
- """
65
- When I run `cucumber`
66
- Then the features should all pass
67
-
68
- Scenario: Running zsh commands
69
- Given a file named "features/shell.feature" with:
70
- """
71
- Feature: Running zsh scripts
72
- Scenario: Running zsh commands
73
- When I run the following commands with `zsh`:
74
- \"\"\"bash
75
- echo "Hello \c"
76
- echo $((2 + 2))
77
- \"\"\"
78
- Then the output should contain exactly "Hello 4"
79
- """
80
- When I run `cucumber`
81
- Then the features should all pass
82
-
83
- Scenario: Running ruby commands
84
- Given a file named "features/shell.feature" with:
85
- """
86
- Feature: Running scripts
87
- Scenario: Running ruby commands
88
- When I run the following commands with `ruby`:
89
- \"\"\"ruby
90
- puts "Hello, Aruba!"
91
- \"\"\"
92
- Then the output should contain "Hello, Aruba!"
93
- """
94
- When I run `cucumber`
95
- Then the features should all pass
96
-
97
- Scenario: Running python commands
98
- Given a file named "features/shell.feature" with:
99
- """
100
- Feature: Running scripts
101
- Scenario: Running ruby commands
102
- When I run the following commands with `python`:
103
- \"\"\"ruby
104
- print("Hello, Aruba!")
105
- \"\"\"
106
- Then the output should contain exactly "Hello, Aruba!"
107
- """
108
- When I run `cucumber`
109
- Then the features should all pass
110
-
111
- Scenario: Running commands if full path to interpreter is given
112
- Given a file named "features/shell.feature" with:
113
- """
114
- Feature: Running full path zsh
115
- Scenario: Running zsh commands #1
116
- When I run the following commands with `/bin/zsh`:
117
- \"\"\"bash
118
- echo "Hello \c"
119
- echo $((6 - 2))
120
- \"\"\"
121
- Then the output should contain exactly "Hello 4"
122
-
123
- Scenario: Running zsh commands #1
124
- When I run the following commands in `/bin/zsh`:
125
- \"\"\"bash
126
- echo "Hello \c"
127
- echo $((6 - 2))
128
- \"\"\"
129
- Then the output should contain exactly "Hello 4"
130
- """
131
- When I run `cucumber`
132
- Then the features should all pass
133
-
134
- Scenario: Running commands if only the name of interpreter is given
135
- Given a file named "features/shell.feature" with:
136
- """
137
- Feature: Running full path zsh
138
- Scenario: Running zsh commands #1
139
- When I run the following commands with `zsh`:
140
- \"\"\"bash
141
- echo "Hello \c"
142
- echo $((6 - 2))
143
- \"\"\"
144
- Then the output should contain exactly "Hello 4"
145
-
146
- Scenario: Running zsh commands #2
147
- When I run the following commands in `zsh`:
148
- \"\"\"bash
149
- echo "Hello \c"
150
- echo $((6 - 2))
151
- \"\"\"
152
- Then the output should contain exactly "Hello 4"
153
- """
154
- When I run `cucumber`
155
- Then the features should all pass
@@ -1,61 +0,0 @@
1
- Feature: Check file content
2
-
3
- Background:
4
- Given I use a fixture named "cli-app"
5
-
6
- Scenario: Check file contents with plain text
7
- Given a file named "features/non-existence.feature" with:
8
- """
9
- Feature: Check
10
- Scenario: Check
11
- Given a file named "foo" with:
12
- \"\"\"
13
- hello world
14
- \"\"\"
15
- Then the file "foo" should contain "hello world"
16
- And the file "foo" should not contain "HELLO WORLD"
17
- """
18
- When I run `cucumber`
19
- Then the features should all pass
20
-
21
- Scenario: Check file contents with regular expression
22
- Given a file named "features/non-existence.feature" with:
23
- """
24
- Feature: Check
25
- Background:
26
- Given a file named "foo" with:
27
- \"\"\"
28
- hello world
29
- \"\"\"
30
-
31
- Scenario: Check #1
32
- Then the file "foo" should match /hel.o world/
33
- And the file "foo" should not match /HELLO WORLD/
34
-
35
- Scenario: Check #2
36
- Then the file "foo" should match %r<hel.o world>
37
- And the file "foo" should not match %r<HELLO WORLD>
38
- """
39
- When I run `cucumber`
40
- Then the features should all pass
41
-
42
- Scenario: Check file contents with cucumber doc string
43
- Given a file named "features/non-existence.feature" with:
44
- """
45
- Feature: Existence
46
- Scenario: Existence
47
- Given a file named "foo" with:
48
- \"\"\"
49
- foo
50
- bar
51
- baz
52
- foobar
53
- \"\"\"
54
- Then the file "foo" should contain:
55
- \"\"\"
56
- bar
57
- baz
58
- \"\"\"
59
- """
60
- When I run `cucumber`
61
- Then the features should all pass
@@ -1,64 +0,0 @@
1
- Feature: Use fixtures in your tests
2
-
3
- Sometimes your tests need existing files to work - e.g binary data files you
4
- cannot create programmatically. Since `aruba` >= 0.6.3 includes some basic
5
- support for fixtures. All you need to do is the following:
6
-
7
- 1. Create a `fixtures`-directory
8
- 2. Create fixture files in this directory
9
-
10
-
11
- Background:
12
- Given I use a fixture named "cli-app"
13
-
14
- Scenario: Use a fixture for your tests
15
- Given a file named "features/fixtures.feature" with:
16
- """
17
- Feature: Fixture
18
- Scenario: Fixture
19
- Given I use a fixture named "fixtures-app"
20
- Then a file named "test.txt" should exist
21
- """
22
- And a directory named "fixtures"
23
- And an empty file named "fixtures/fixtures-app/test.txt"
24
- When I run `cucumber`
25
- Then the features should all pass
26
-
27
- Scenario: Use a fixture for your tests in test/
28
- Given a file named "features/fixtures.feature" with:
29
- """
30
- Feature: Fixture
31
- Scenario: Fixture
32
- Given I use a fixture named "fixtures-app"
33
- Then a file named "test.txt" should exist
34
- """
35
- And a directory named "test/fixtures"
36
- And an empty file named "test/fixtures/fixtures-app/test.txt"
37
- When I run `cucumber`
38
- Then the features should all pass
39
-
40
- Scenario: Use a fixture for your tests in specs/
41
- Given a file named "features/fixtures.feature" with:
42
- """
43
- Feature: Fixture
44
- Scenario: Fixture
45
- Given I use a fixture named "fixtures-app"
46
- Then a file named "test.txt" should exist
47
- """
48
- And a directory named "spec/fixtures"
49
- And an empty file named "spec/fixtures/fixtures-app/test.txt"
50
- When I run `cucumber`
51
- Then the features should all pass
52
-
53
- Scenario: Use a fixture for your tests in features/
54
- Given a file named "features/fixtures.feature" with:
55
- """
56
- Feature: Fixture
57
- Scenario: Fixture
58
- Given I use a fixture named "fixtures-app"
59
- Then a file named "test.txt" should exist
60
- """
61
- And a directory named "features/fixtures"
62
- And an empty file named "features/fixtures/fixtures-app/test.txt"
63
- When I run `cucumber`
64
- Then the features should all pass
@@ -1,25 +0,0 @@
1
- Feature: Overview of steps
2
-
3
- Given you're a system administrator
4
- Who would like to use `aruba`
5
- But didn't know which steps are available
6
-
7
- Scenario: Use cucumber output formatter
8
- Given I use a fixture named "cli-app"
9
- And a file named "features/run.feature" with:
10
- """
11
- Feature: Run it
12
- Scenario: Run command
13
- Given a directory named "features"
14
- And a file named "features/support/env.rb" with:
15
- \"\"\"
16
- require 'aruba/cucumber'
17
- \"\"\"
18
- When I run `cucumber --format stepdefs`
19
- Then the output should contain:
20
- \"\"\"
21
- NOT MATCHED BY ANY STEPS
22
- \"\"\"
23
- """
24
- When I run `cucumber`
25
- Then the features should all pass