forked from cucumber/aruba
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexit_timeout.feature
52 lines (47 loc) · 1.25 KB
/
exit_timeout.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Feature: Configure timeout for command execution
As a developer
I want to configure the timeout when executing a command
In order to support some longer running commands
Background:
Given I use the fixture "cli-app"
Scenario: Default value
Given a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
puts %(The default value is "#{config.exit_timeout}")
end
"""
When I successfully run `cucumber`
Then the output should contain:
"""
The default value is "15"
"""
Scenario: Modify value
Given an executable named "bin/aruba-test-cli" with:
"""bash
#!/bin/bash
sleep 1
"""
And a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 2
end
"""
And the default feature-test
Then I successfully run `cucumber`
Scenario: Fails if takes longer
Given an executable named "bin/aruba-test-cli" with:
"""ruby
#!/bin/bash
sleep 2
"""
And a file named "features/support/aruba.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 1
end
"""
And the default feature-test
Then I run `cucumber`
And the exit status should be 1