File: non_existence_of_file.feature

package info (click to toggle)
ruby-aruba 0.14.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,216 kB
  • sloc: ruby: 7,951; sh: 21; makefile: 12
file content (80 lines) | stat: -rw-r--r-- 2,504 bytes parent folder | download | duplicates (5)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
Feature: Make sure and check a file does not exist

  To setup a working environment, you may want to make sure, that a
  file does not exist or if you ran your command of a file
  was deleted.

  Background:
    Given I use a fixture named "cli-app"

  Scenario: Delete existing file
    Given a file named "features/non-existence.feature" with:
    """
    Feature: Non-Existence
      Background:
        Given a file named "example.txt" does not exist

      Scenario: Non-Existence #1
        Then the file "example.txt" should not exist

      Scenario: Non-Existence #2
        Then the file "example.txt" should not exist

      Scenario: Non-Existence #3
        Then the file "example.txt" should not exist
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Check if a file does not exists
    Given a file named "features/non-existence.feature" with:
    """
    Feature: Non-Existence
      Background:
        Given a file named "example.txt" does not exist

      Scenario: Non-Existence #1
        Then the file "example.txt" should not exist

      Scenario: Non-Existence #2
        Then the file named "example.txt" should not exist

      Scenario: Non-Existence #3
        Then a file named "example.txt" should not exist

      Scenario: Non-Existence #4
        Then a file named "example.txt" should not exist anymore

      Scenario: Non-Existence #5
        Then the file named "example.txt" should not exist anymore

      Scenario: Non-Existence #6
        Then the file "example.txt" should not exist anymore
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Check for absence of multiple files
    Given a file named "features/non-existence.feature" with:
    """
    Feature: Non-Existence
      Scenario: Non-Existence
        Given the file "lorem/ipsum/dolor.txt" does not exist
        Given the file "lorem/ipsum/sit.txt" does not exist
        Then the following files should not exist:
          | lorem/ipsum/dolor.txt |
          | lorem/ipsum/sit.txt |
    """
    When I run `cucumber`
    Then the features should all pass

  Scenario: Check for absence of a single file using a regex
    Given a file named "features/non-existence.feature" with:
    """
    Feature: Existence
      Scenario: Existence
        Given the file "lorem/ipsum/sit.txt" does not exist
        Then a file matching %r<^ipsum> should not exist
    """
    When I run `cucumber`
    Then the features should all pass