aruba 0.9.0.pre → 0.9.0.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +8 -3
- data/History.md +61 -19
- data/README.md +10 -6
- data/TODO.md +6 -1
- data/cucumber.yml +10 -6
- data/features/.nav +72 -0
- data/features/announce.feature +203 -0
- data/features/api/command/extract_text.feature +10 -0
- data/features/api/command/run.feature +6 -6
- data/features/api/command/stop_all_commands.feature +53 -0
- data/features/api/command/terminate_all_commands.feature +53 -0
- data/features/api/command/unescape_text.feature +12 -0
- data/features/api/command/which.feature +3 -3
- data/features/api/core/expand_path.feature +4 -4
- data/features/api/environment/append_environment_variable.feature +18 -8
- data/features/api/environment/prepend_environment_variable.feature +18 -8
- data/features/api/environment/set_environment_variable.feature +33 -16
- data/features/api/filesystem/cd.feature +23 -13
- data/features/api/filesystem/create_directory.feature +2 -2
- data/features/api/filesystem/disk_usage.feature +7 -6
- data/features/api/filesystem/does_exist.feature +2 -2
- data/features/api/filesystem/is_absolute.feature +2 -2
- data/features/api/filesystem/is_directory.feature +2 -2
- data/features/api/filesystem/is_file.feature +2 -2
- data/features/api/filesystem/is_relative.feature +2 -2
- data/features/api/filesystem/move.feature +119 -0
- data/features/cli/console.feature +3 -3
- data/features/commands/debug_command.feature +93 -0
- data/features/commands/environment_variables.feature +64 -0
- data/features/commands/flushing.feature +74 -0
- data/features/commands/interactive.feature +90 -0
- data/features/commands/output/all_output.feature +445 -0
- data/features/commands/output/stdout.feature +66 -0
- data/features/configuration/exit_timeout.feature +5 -5
- data/features/configuration/fixtures_directories.feature +3 -3
- data/features/configuration/fixtures_path_prefix.feature +1 -1
- data/features/configuration/home_directory.feature +4 -4
- data/features/configuration/io_timeout.feature +2 -2
- data/features/configuration/keep_ansi.feature +2 -2
- data/features/configuration/log_level.feature +3 -3
- data/features/configuration/physical_block_size.feature +3 -3
- data/features/configuration/usage.feature +159 -0
- data/features/core/cleanup_aruba_directory.feature +52 -0
- data/features/development/build.feature +16 -0
- data/features/development/test.feature +24 -0
- data/features/file_system_commands.feature +12 -12
- data/features/getting_started/supported_programming_languages.feature +89 -0
- data/features/hooks/after/command.feature +1 -1
- data/features/hooks/before/command.feature +2 -2
- data/features/matchers/collection/include_an_object.feature +72 -0
- data/features/matchers/timeouts.feature +2 -2
- data/features/output.feature +60 -181
- data/features/step_definitions/aruba_dev_steps.rb +17 -10
- data/features/step_definitions/hooks.rb +11 -0
- data/features/steps/commands/exit_statuses.feature +3 -3
- data/features/steps/commands/run.feature +0 -15
- data/features/steps/filesystem/copy.feature +45 -0
- data/features/steps/filesystem/create_directory.feature +47 -0
- data/features/steps/filesystem/create_file.feature +53 -0
- data/features/steps/filesystem/file_content.feature +1 -1
- data/features/steps/filesystem/move.feature +45 -0
- data/features/steps/filesystem/overwrite_file.feature +72 -0
- data/features/steps/filesystem/use_fixture.feature +77 -0
- data/features/usage/install.feature +8 -0
- data/{features/fixtures → fixtures}/cli-app/.gitignore +0 -0
- data/{features/fixtures → fixtures}/cli-app/.rspec +0 -0
- data/{features/fixtures → fixtures}/cli-app/README.md +0 -0
- data/{features/fixtures → fixtures}/cli-app/Rakefile +0 -0
- data/{features/fixtures → fixtures}/cli-app/bin/cli +0 -0
- data/{features/fixtures → fixtures}/cli-app/cli-app.gemspec +0 -0
- data/{features/fixtures → fixtures}/cli-app/features/support/env.rb +0 -0
- data/{features/fixtures → fixtures}/cli-app/lib/cli/app.rb +0 -0
- data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +15 -0
- data/{features/fixtures → fixtures}/cli-app/lib/cli/app/version.rb +0 -0
- data/{features/fixtures/empty-app → fixtures/cli-app}/script/console +3 -3
- data/{features/fixtures → fixtures}/cli-app/spec/spec_helper.rb +0 -0
- data/{features/fixtures → fixtures}/cli-app/spec/support/aruba.rb +0 -0
- data/{features/fixtures → fixtures}/copy/file.txt +0 -0
- data/{features/fixtures → fixtures}/empty-app/.gitignore +0 -0
- data/{features/fixtures → fixtures}/empty-app/.rspec +0 -0
- data/{features/fixtures → fixtures}/empty-app/README.md +0 -0
- data/{features/fixtures → fixtures}/empty-app/Rakefile +0 -0
- data/{features/fixtures → fixtures}/empty-app/bin/cli +0 -0
- data/{features/fixtures → fixtures}/empty-app/cli-app.gemspec +0 -0
- data/{features/fixtures → fixtures}/empty-app/lib/cli/app.rb +0 -0
- data/{features/fixtures → fixtures}/empty-app/lib/cli/app/version.rb +0 -0
- data/{features/fixtures/cli-app → fixtures/empty-app}/script/console +3 -3
- data/{features/fixtures → fixtures}/empty-app/spec/spec_helper.rb +0 -0
- data/{features/fixtures → fixtures}/fixtures-app/test.txt +0 -0
- data/fixtures/getting-started-app/.gitignore +4 -0
- data/fixtures/getting-started-app/Gemfile +4 -0
- data/fixtures/getting-started-app/README.md +3 -0
- data/fixtures/getting-started-app/features/support/env.rb +1 -0
- data/{features/fixtures → fixtures}/spawn_process/stderr.sh +0 -0
- data/lib/aruba/announcer.rb +6 -2
- data/lib/aruba/api.rb +0 -16
- data/lib/aruba/api/command.rb +64 -266
- data/lib/aruba/api/core.rb +24 -26
- data/lib/aruba/api/deprecated.rb +370 -12
- data/lib/aruba/api/filesystem.rb +64 -15
- data/lib/aruba/aruba_path.rb +4 -0
- data/lib/aruba/config.rb +1 -1
- data/lib/aruba/cucumber.rb +5 -449
- data/lib/aruba/cucumber/command.rb +378 -0
- data/lib/aruba/cucumber/core.rb +29 -0
- data/lib/aruba/cucumber/environment.rb +30 -0
- data/lib/aruba/cucumber/file.rb +210 -0
- data/lib/aruba/cucumber/hooks.rb +11 -14
- data/lib/aruba/cucumber/rvm.rb +3 -0
- data/lib/aruba/matchers/base/base_matcher.rb +94 -0
- data/lib/aruba/matchers/collection.rb +1 -0
- data/lib/aruba/matchers/collection/all_objects.rb +2 -0
- data/lib/aruba/matchers/collection/include_an_object.rb +120 -0
- data/lib/aruba/matchers/command/be_successfully_executed.rb +3 -3
- data/lib/aruba/matchers/command/have_exit_status.rb +2 -11
- data/lib/aruba/matchers/command/have_finished_in_time.rb +5 -5
- data/lib/aruba/matchers/command/have_output.rb +46 -0
- data/lib/aruba/matchers/command/have_output_on_stderr.rb +42 -0
- data/lib/aruba/matchers/command/have_output_on_stdout.rb +42 -0
- data/lib/aruba/matchers/command/have_output_size.rb +28 -0
- data/lib/aruba/matchers/directory/be_an_existing_directory.rb +1 -1
- data/lib/aruba/matchers/file/be_an_existing_file.rb +1 -1
- data/lib/aruba/matchers/file/have_file_content.rb +1 -1
- data/lib/aruba/matchers/file/have_file_size.rb +2 -2
- data/lib/aruba/matchers/file/have_same_file_content.rb +1 -1
- data/lib/aruba/matchers/path/have_permissions.rb +1 -1
- data/lib/aruba/platforms/aruba_file_creator.rb +2 -3
- data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +2 -3
- data/lib/aruba/platforms/determine_disk_usage.rb +23 -0
- data/lib/aruba/platforms/determine_file_size.rb +13 -0
- data/lib/aruba/platforms/disk_usage_calculator.rb +11 -0
- data/lib/aruba/platforms/local_environment.rb +15 -0
- data/lib/aruba/platforms/unix_environment_variables.rb +1 -1
- data/lib/aruba/platforms/unix_platform.rb +35 -14
- data/lib/aruba/process_monitor.rb +53 -7
- data/lib/aruba/processes/basic_process.rb +25 -5
- data/lib/aruba/processes/debug_process.rb +27 -25
- data/lib/aruba/processes/in_process.rb +7 -22
- data/lib/aruba/processes/spawn_process.rb +74 -31
- data/lib/aruba/rspec.rb +1 -6
- data/lib/aruba/version.rb +1 -1
- data/script/console +0 -1
- data/spec/aruba/api/environment/restore_env_spec.rb +65 -0
- data/spec/aruba/api/environment/set_env_spec.rb +42 -0
- data/spec/aruba/api/filesystem/file_size_spec.rb +28 -0
- data/spec/aruba/api_spec.rb +10 -7
- data/spec/aruba/matchers/command/have_output_size_spec.rb +25 -0
- data/spec/aruba/matchers/command_spec.rb +135 -4
- data/spec/aruba/spawn_process_spec.rb +1 -1
- metadata +107 -65
- data/.nav +0 -12
- data/features/debug.feature +0 -15
- data/features/fixtures/cli-app/spec/cli/app_spec.rb +0 -7
- data/features/flushing.feature +0 -26
- data/features/interactive.feature +0 -66
- data/features/no_clobber.feature +0 -25
- data/lib/aruba/disk_usage_calculator.rb +0 -7
@@ -9,7 +9,7 @@ Feature: Configure timeout for command execution
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.exit_timeout}")
|
15
15
|
end
|
@@ -22,12 +22,12 @@ Feature: Configure timeout for command execution
|
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
24
|
Given an executable named "bin/cli" with:
|
25
|
-
"""
|
25
|
+
"""bash
|
26
26
|
#!/bin/bash
|
27
27
|
sleep 1
|
28
28
|
"""
|
29
29
|
And a file named "features/support/aruba.rb" with:
|
30
|
-
"""
|
30
|
+
"""ruby
|
31
31
|
Aruba.configure do |config|
|
32
32
|
config.exit_timeout = 2
|
33
33
|
end
|
@@ -37,12 +37,12 @@ Feature: Configure timeout for command execution
|
|
37
37
|
|
38
38
|
Scenario: Fails if takes longer
|
39
39
|
Given an executable named "bin/cli" with:
|
40
|
-
"""
|
40
|
+
"""ruby
|
41
41
|
#!/bin/bash
|
42
42
|
sleep 2
|
43
43
|
"""
|
44
44
|
And a file named "features/support/aruba.rb" with:
|
45
|
-
"""
|
45
|
+
"""ruby
|
46
46
|
Aruba.configure do |config|
|
47
47
|
config.exit_timeout = 1
|
48
48
|
end
|
@@ -9,7 +9,7 @@ Feature: Configure directory where to look for fixtures
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "%w(#{config.fixtures_directories.join(" ")})")
|
15
15
|
end
|
@@ -17,12 +17,12 @@ Feature: Configure directory where to look for fixtures
|
|
17
17
|
When I successfully run `cucumber`
|
18
18
|
Then the output should contain:
|
19
19
|
"""
|
20
|
-
The default value is "%w(features/fixtures spec/fixtures test/fixtures)"
|
20
|
+
The default value is "%w(features/fixtures spec/fixtures test/fixtures fixtures)"
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
24
|
Given a file named "features/support/aruba.rb" with:
|
25
|
-
"""
|
25
|
+
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.fixtures_directories = %w(spec/fixtures)
|
28
28
|
end
|
@@ -14,7 +14,7 @@ Feature: Configure the home directory to be used with aruba
|
|
14
14
|
|
15
15
|
Scenario: Default value
|
16
16
|
Given a file named "features/support/aruba.rb" with:
|
17
|
-
"""
|
17
|
+
"""ruby
|
18
18
|
Aruba.configure do |config|
|
19
19
|
puts %(The default value is "#{config.home_directory}")
|
20
20
|
end
|
@@ -27,7 +27,7 @@ Feature: Configure the home directory to be used with aruba
|
|
27
27
|
|
28
28
|
Scenario: Set to current working directory
|
29
29
|
Given a file named "features/support/aruba.rb" with:
|
30
|
-
"""
|
30
|
+
"""ruby
|
31
31
|
Aruba.configure do |config|
|
32
32
|
# use current working directory
|
33
33
|
config.home_directory = '.'
|
@@ -45,7 +45,7 @@ Feature: Configure the home directory to be used with aruba
|
|
45
45
|
|
46
46
|
Scenario: Set to aruba's working directory
|
47
47
|
Given a file named "features/support/aruba.rb" with:
|
48
|
-
"""
|
48
|
+
"""ruby
|
49
49
|
Aruba.configure do |config|
|
50
50
|
# Use aruba working directory
|
51
51
|
config.home_directory = File.join(config.root_directory, config.working_directory)
|
@@ -63,7 +63,7 @@ Feature: Configure the home directory to be used with aruba
|
|
63
63
|
|
64
64
|
Scenario: Set to some other path (deprecated)
|
65
65
|
Given a file named "features/support/aruba.rb" with:
|
66
|
-
"""
|
66
|
+
"""ruby
|
67
67
|
Aruba.configure do |config|
|
68
68
|
# use current working directory
|
69
69
|
config.home_directory = '/tmp/home'
|
@@ -9,7 +9,7 @@ Feature: Configure timeout for io of commands
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.io_wait_timeout}")
|
15
15
|
end
|
@@ -22,7 +22,7 @@ Feature: Configure timeout for io of commands
|
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
24
|
Given a file named "features/support/aruba.rb" with:
|
25
|
-
"""
|
25
|
+
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.io_wait_timeout = 2
|
28
28
|
end
|
@@ -9,7 +9,7 @@ Feature: Configure if ansi color codes should be stripped off from command outpu
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.keep_ansi}")
|
15
15
|
end
|
@@ -22,7 +22,7 @@ Feature: Configure if ansi color codes should be stripped off from command outpu
|
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
24
|
Given a file named "features/support/aruba.rb" with:
|
25
|
-
"""
|
25
|
+
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.keep_ansi = true
|
28
28
|
end
|
@@ -9,20 +9,20 @@ Feature: Configure Log level of aruba logger
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.log_level}")
|
15
15
|
end
|
16
16
|
"""
|
17
17
|
When I successfully run `cucumber`
|
18
18
|
Then the output should contain:
|
19
|
-
"""
|
19
|
+
"""ruby
|
20
20
|
The default value is "info"
|
21
21
|
"""
|
22
22
|
|
23
23
|
Scenario: Modify value
|
24
24
|
Given a file named "features/support/aruba.rb" with:
|
25
|
-
"""
|
25
|
+
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
config.log_level = :warn
|
28
28
|
end
|
@@ -9,7 +9,7 @@ Feature: Configure the phsical block size of disk
|
|
9
9
|
|
10
10
|
Scenario: Default value
|
11
11
|
Given a file named "features/support/aruba.rb" with:
|
12
|
-
"""
|
12
|
+
"""ruby
|
13
13
|
Aruba.configure do |config|
|
14
14
|
puts %(The default value is "#{config.physical_block_size}")
|
15
15
|
end
|
@@ -22,7 +22,7 @@ Feature: Configure the phsical block size of disk
|
|
22
22
|
|
23
23
|
Scenario: Set the block size to something else which is a power of two
|
24
24
|
Given a file named "features/support/aruba.rb" with:
|
25
|
-
"""
|
25
|
+
"""ruby
|
26
26
|
Aruba.configure do |config|
|
27
27
|
# use current working directory
|
28
28
|
config.physical_block_size = 4096
|
@@ -40,7 +40,7 @@ Feature: Configure the phsical block size of disk
|
|
40
40
|
|
41
41
|
Scenario: The value needs to be a power of two, otherwise it will fail
|
42
42
|
Given a file named "features/support/aruba.rb" with:
|
43
|
-
"""
|
43
|
+
"""ruby
|
44
44
|
Aruba.configure do |config|
|
45
45
|
config.physical_block_size = 3
|
46
46
|
end
|
@@ -0,0 +1,159 @@
|
|
1
|
+
Feature: Usage of configuration
|
2
|
+
|
3
|
+
You can configure `aruba` in two ways:
|
4
|
+
|
5
|
+
1. Using `Aruba.configure`-block
|
6
|
+
2. Using `aruba.config.<option> = <value>`
|
7
|
+
|
8
|
+
The first (1.) should be used to set defaults for ALL your tests. It changes
|
9
|
+
values on loadtime. The latter (2.) should be used to change options only for
|
10
|
+
specific tests during runtime. `aruba.config` contains the runtime
|
11
|
+
configuration of aruba which is reset to the loadtime configuration before
|
12
|
+
each test is run.
|
13
|
+
|
14
|
+
Background:
|
15
|
+
Given I use a fixture named "cli-app"
|
16
|
+
And an executable named "bin/cli" with:
|
17
|
+
"""bash
|
18
|
+
#!/bin/bash
|
19
|
+
trap "exit 128" SIGTERM SIGINT
|
20
|
+
sleep $*
|
21
|
+
"""
|
22
|
+
|
23
|
+
Scenario: Setting default values for option for RSpec
|
24
|
+
Given a file named "spec/support/aruba.rb" with:
|
25
|
+
"""ruby
|
26
|
+
require 'aruba/rspec'
|
27
|
+
|
28
|
+
Aruba.configure do |config|
|
29
|
+
config.exit_timeout = 1
|
30
|
+
end
|
31
|
+
"""
|
32
|
+
And a file named "spec/usage_configuration_spec.rb" with:
|
33
|
+
"""ruby
|
34
|
+
require 'spec_helper'
|
35
|
+
|
36
|
+
RSpec.describe 'Run command', :type => :aruba do
|
37
|
+
context 'when fast command' do
|
38
|
+
before(:each) { run('cli 0') }
|
39
|
+
it { expect(last_command_started).to be_successfully_executed }
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'when slow command' do
|
43
|
+
before(:each) { run('cli 2') }
|
44
|
+
it { expect(last_command_started).not_to be_successfully_executed }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
"""
|
48
|
+
When I run `rspec`
|
49
|
+
Then the specs should all pass
|
50
|
+
|
51
|
+
Scenario: Setting option during runtime for RSpec
|
52
|
+
|
53
|
+
Maybe there are some long running tests, which need longer. You may not
|
54
|
+
want to set the default timeout for all commands to the maximum value only
|
55
|
+
to prevent those commands from failing.
|
56
|
+
|
57
|
+
Given a file named "spec/support/aruba.rb" with:
|
58
|
+
"""ruby
|
59
|
+
require 'aruba/rspec'
|
60
|
+
|
61
|
+
Aruba.configure do |config|
|
62
|
+
config.exit_timeout = 1
|
63
|
+
end
|
64
|
+
"""
|
65
|
+
And a file named "spec/support/hooks.rb" with:
|
66
|
+
"""ruby
|
67
|
+
RSpec.configure do |config|
|
68
|
+
config.before :each do |example|
|
69
|
+
next unless example.metadata.key? :slow_command
|
70
|
+
|
71
|
+
aruba.config.exit_timeout = 5
|
72
|
+
end
|
73
|
+
end
|
74
|
+
"""
|
75
|
+
And a file named "spec/usage_configuration_spec.rb" with:
|
76
|
+
"""ruby
|
77
|
+
require 'spec_helper'
|
78
|
+
|
79
|
+
RSpec.describe 'Run command', :type => :aruba do
|
80
|
+
context 'when fast command' do
|
81
|
+
before(:each) { run('cli 0') }
|
82
|
+
it { expect(last_command_started).to be_successfully_executed }
|
83
|
+
end
|
84
|
+
|
85
|
+
context 'when slow command and this is known by the developer', :slow_command => true do
|
86
|
+
before(:each) { run('cli 2') }
|
87
|
+
it { expect(last_command_started).to be_successfully_executed }
|
88
|
+
end
|
89
|
+
|
90
|
+
context 'when slow command, but this might be a failure' do
|
91
|
+
before(:each) { run('cli 2') }
|
92
|
+
it { expect(last_command_started).not_to be_successfully_executed }
|
93
|
+
end
|
94
|
+
end
|
95
|
+
"""
|
96
|
+
When I run `rspec`
|
97
|
+
Then the specs should all pass
|
98
|
+
|
99
|
+
Scenario: Setting default values for option for Cucumber
|
100
|
+
Given a file named "features/support/aruba.rb" with:
|
101
|
+
"""ruby
|
102
|
+
require 'aruba/cucumber'
|
103
|
+
|
104
|
+
Aruba.configure do |config|
|
105
|
+
config.exit_timeout = 1
|
106
|
+
end
|
107
|
+
"""
|
108
|
+
And a file named "features/run.feature" with:
|
109
|
+
"""
|
110
|
+
Feature: Run it
|
111
|
+
Scenario: Fast command
|
112
|
+
When I run `cli 0`
|
113
|
+
Then the exit status should be 0
|
114
|
+
|
115
|
+
Scenario: Slow command
|
116
|
+
When I run `cli 2`
|
117
|
+
Then the exit status should be 128
|
118
|
+
"""
|
119
|
+
When I run `cucumber`
|
120
|
+
Then the features should all pass
|
121
|
+
|
122
|
+
Scenario: Setting option during runtime for Cucumber
|
123
|
+
|
124
|
+
Maybe there are some long running tests, which need longer. You may not
|
125
|
+
want to set the default timeout for all commands to the maximum value only
|
126
|
+
to prevent those commands from failing.
|
127
|
+
|
128
|
+
Given a file named "features/support/aruba.rb" with:
|
129
|
+
"""ruby
|
130
|
+
require 'aruba/cucumber'
|
131
|
+
|
132
|
+
Aruba.configure do |config|
|
133
|
+
config.exit_timeout = 1
|
134
|
+
end
|
135
|
+
"""
|
136
|
+
And a file named "features/support/hooks.rb" with:
|
137
|
+
"""ruby
|
138
|
+
Before '@slow-command' do
|
139
|
+
aruba.config.exit_timeout = 5
|
140
|
+
end
|
141
|
+
"""
|
142
|
+
And a file named "features/usage_configuration.feature" with:
|
143
|
+
"""
|
144
|
+
Feature: Run it
|
145
|
+
Scenario: Fast command
|
146
|
+
When I run `cli 0`
|
147
|
+
Then the exit status should be 0
|
148
|
+
|
149
|
+
@slow-command
|
150
|
+
Scenario: Slow command known by the developer
|
151
|
+
When I run `cli 2`
|
152
|
+
Then the exit status should be 0
|
153
|
+
|
154
|
+
Scenario: Slow command which might be a failure
|
155
|
+
When I run `cli 3`
|
156
|
+
Then the exit status should be 128
|
157
|
+
"""
|
158
|
+
When I run `cucumber`
|
159
|
+
Then the features should all pass
|
@@ -0,0 +1,52 @@
|
|
1
|
+
Feature: No clobber
|
2
|
+
|
3
|
+
By default Aruba removes its scratch directory before
|
4
|
+
every scenario. This isn't always the right thing
|
5
|
+
to do, especially when the path to the default directory
|
6
|
+
has been changed. Use @no-clobber to stop Aruba from
|
7
|
+
cleaning up after itself.
|
8
|
+
|
9
|
+
Background:
|
10
|
+
Given I use a fixture named "cli-app"
|
11
|
+
|
12
|
+
Scenario: Changes in the filesystem
|
13
|
+
Given a file named "tmp/aruba/file.txt" with "content"
|
14
|
+
And a directory named "tmp/aruba/dir.d"
|
15
|
+
And a file named "features/flushing.feature" with:
|
16
|
+
"""
|
17
|
+
Feature: Check
|
18
|
+
Scenario: Check
|
19
|
+
Then a file named "file.txt" does not exist
|
20
|
+
And a directory named "dir.d" does not exist
|
21
|
+
"""
|
22
|
+
When I run `cucumber`
|
23
|
+
Then the features should all pass
|
24
|
+
|
25
|
+
Scenario: Do not clobber before run
|
26
|
+
Given a file named "tmp/aruba/file.txt" with "content"
|
27
|
+
And a directory named "tmp/aruba/dir.d"
|
28
|
+
And a file named "features/flushing.feature" with:
|
29
|
+
"""
|
30
|
+
Feature: Check
|
31
|
+
@no-clobber
|
32
|
+
Scenario: Check
|
33
|
+
Then a file named "file.txt" should exist
|
34
|
+
And a directory named "dir.d" should exist
|
35
|
+
"""
|
36
|
+
When I run `cucumber`
|
37
|
+
Then the features should all pass
|
38
|
+
|
39
|
+
Scenario: Cleanup and verify the previous scenario
|
40
|
+
Given a file named "features/flushing.feature" with:
|
41
|
+
"""
|
42
|
+
Feature: Check
|
43
|
+
Scenario: Check #1
|
44
|
+
Given a file named "tmp/aruba/file.txt" with "content"
|
45
|
+
And a directory named "tmp/aruba/dir.d"
|
46
|
+
|
47
|
+
Scenario: Check #2
|
48
|
+
Then a file named "file.txt" should not exist
|
49
|
+
And a directory named "dir.d" should not exist
|
50
|
+
"""
|
51
|
+
When I run `cucumber`
|
52
|
+
Then the features should all pass
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Feature: Build Aruba Gem
|
2
|
+
|
3
|
+
As a aruba developer
|
4
|
+
I want to build the `aruba` gem
|
5
|
+
In order to install it
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I successfully run `git clone https://github.com/cucumber/aruba.git`
|
9
|
+
And I cd to "aruba"
|
10
|
+
|
11
|
+
Scenario: Building aruba using rake task
|
12
|
+
|
13
|
+
To build the `aruba`-gem you can use the `build`-rake task.
|
14
|
+
|
15
|
+
Given I successfully run `rake build`
|
16
|
+
Then a file matching %r<pkg/aruba.*\.gem> should exist
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Feature: Run test suite of aruba
|
2
|
+
|
3
|
+
As a aruba developer
|
4
|
+
I want to run the test suite of aruba
|
5
|
+
In order to make changes to it
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given the default aruba exit timeout is 120 seconds
|
9
|
+
And I successfully run `git clone https://github.com/cucumber/aruba.git`
|
10
|
+
And I cd to "aruba"
|
11
|
+
|
12
|
+
@ignore
|
13
|
+
Scenario: Testing user interface
|
14
|
+
Given I successfully run `cucumber`
|
15
|
+
Then the features should all pass
|
16
|
+
|
17
|
+
@unsupported-on-ruby-older-193
|
18
|
+
Scenario: Testing compliance to ruby community guide
|
19
|
+
Given I successfully run `rubocop`
|
20
|
+
Then the features should all pass
|
21
|
+
|
22
|
+
Scenario: Testing api
|
23
|
+
Given I successfully run `rspec`
|
24
|
+
Then the features should all pass
|