stringup 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +14 -10
- data/VERSION +1 -1
- data/examples/puppet/scenarios.rb +1 -1
- data/examples/touch/scenarios.rb +1 -1
- data/lib/stringup/assertions/{file_creates_assertion.rb → creates_file_assertion.rb} +2 -2
- data/lib/stringup/assertions/{file_removes_assertion.rb → removes_file_assertion.rb} +2 -2
- metadata +4 -4
data/README.markdown
CHANGED
@@ -1,24 +1,23 @@
|
|
1
1
|
Stringup
|
2
2
|
========
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
A quick and dirty test harness for testing assertions before and after
|
5
|
+
an executable is run.
|
6
6
|
|
7
7
|
Synopsis
|
8
8
|
--------
|
9
9
|
|
10
|
-
|
10
|
+
Stringup is a simple language used to define scenarios that model
|
11
|
+
the correct behavior of an executable.
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
The description file consists of exactle one `command` line and any
|
13
|
+
The description file consists of exactly one `command` line and any
|
15
14
|
number of `scenario` definitions; for example, the following file can
|
16
15
|
be used to verify running `touch /tmp/foo` will create a new file:
|
17
16
|
|
18
17
|
command 'touch /tmp/foo'
|
19
18
|
|
20
19
|
scenario :new, "Creates a file" do
|
21
|
-
|
20
|
+
assert_creates_file '/tmp/foo'
|
22
21
|
end
|
23
22
|
|
24
23
|
If this was in `scenarios.rb`, you could run this with stringup:
|
@@ -29,7 +28,7 @@ If you had named the scenario `default`, the `--scenario` option
|
|
29
28
|
wouldn't have been necessary, ie:
|
30
29
|
|
31
30
|
scenario :default "Creates a file" do
|
32
|
-
|
31
|
+
assert_creates_file '/tmp/foo'
|
33
32
|
end
|
34
33
|
|
35
34
|
$ stringup execute scenarios.rb
|
@@ -78,6 +77,11 @@ eg:
|
|
78
77
|
|
79
78
|
$ stringup help execute
|
80
79
|
|
80
|
+
Examples
|
81
|
+
--------
|
82
|
+
|
83
|
+
See the `examples/` directory.
|
84
|
+
|
81
85
|
Assertions
|
82
86
|
----------
|
83
87
|
|
@@ -92,14 +96,14 @@ Note: If you put your assertions in `~/.stringup/assertions/*.rb`,
|
|
92
96
|
they'll automatically be loaded. If you create any interesting
|
93
97
|
assertions, make sure you let me know!
|
94
98
|
|
95
|
-
###
|
99
|
+
### assert_creates_file
|
96
100
|
|
97
101
|
Checks to see if a file was created.
|
98
102
|
|
99
103
|
You can pass `:file => true` or `:directory => true` to ensure the
|
100
104
|
file is a regular file or directory.
|
101
105
|
|
102
|
-
###
|
106
|
+
### assert_removes_file
|
103
107
|
|
104
108
|
Checks to see if a file was removed.
|
105
109
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/examples/touch/scenarios.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Bruce Williams
|
@@ -65,9 +65,9 @@ files:
|
|
65
65
|
- examples/touch/scenarios.rb
|
66
66
|
- lib/stringup.rb
|
67
67
|
- lib/stringup/assertion.rb
|
68
|
+
- lib/stringup/assertions/creates_file_assertion.rb
|
68
69
|
- lib/stringup/assertions/file_assertion.rb
|
69
|
-
- lib/stringup/assertions/
|
70
|
-
- lib/stringup/assertions/file_removes_assertion.rb
|
70
|
+
- lib/stringup/assertions/removes_file_assertion.rb
|
71
71
|
- lib/stringup/cli.rb
|
72
72
|
- lib/stringup/runner.rb
|
73
73
|
- lib/stringup/scenario.rb
|