This repository has been archived by the owner on Mar 1, 2019. It is now read-only.
forked from cucumber/aruba
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cleanup.feature
67 lines (59 loc) · 2.06 KB
/
cleanup.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Feature: Cleanup Aruba Working Directory
By default Aruba removes its scratch directory before
every scenario. This isn't always the right thing
to do, especially when the path to the default directory
has been changed. Use @no-clobber to stop Aruba from
cleaning up after itself.
Background:
Given I use a fixture named "cli-app"
Scenario: Changes in the filesystem
Given a file named "tmp/aruba/file.txt" with "content"
And a directory named "tmp/aruba/dir.d"
And a file named "features/flushing.feature" with:
"""
Feature: Check
Scenario: Check
Then a file named "file.txt" does not exist
And a directory named "dir.d" does not exist
"""
When I run `cucumber`
Then the features should all pass
Scenario: Do not clobber before run
Given a file named "tmp/aruba/file.txt" with "content"
And a directory named "tmp/aruba/dir.d"
And a file named "features/flushing.feature" with:
"""
Feature: Check
@no-clobber
Scenario: Check
Then a file named "file.txt" should exist
And a directory named "dir.d" should exist
"""
When I run `cucumber`
Then the features should all pass
Scenario: Cleanup and verify the previous scenario
Given a file named "features/flushing.feature" with:
"""
Feature: Check
Scenario: Check #1
Given a file named "tmp/aruba/file.txt" with "content"
And a directory named "tmp/aruba/dir.d"
Scenario: Check #2
Then a file named "file.txt" should not exist
And a directory named "dir.d" should not exist
"""
When I run `cucumber`
Then the features should all pass
Scenario: Current directory from previous scenario is reseted
Given a file named "features/non-existence.feature" with:
"""
Feature: Reset
Scenario: Reset #1
Given a directory named "dir1"
When I cd to "dir1"
Scenario: Reset #2
When I run `pwd`
Then the output should match %r</tmp/aruba$>
"""
When I run `cucumber`
Then the features should all pass