stringup 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,24 +1,23 @@
1
1
  Stringup
2
2
  ========
3
3
 
4
- Quick and dirty test harness for executables, testing assertions
5
- before and after it is run.
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
- Run stringup with:
10
+ Stringup is a simple language used to define scenarios that model
11
+ the correct behavior of an executable.
11
12
 
12
- $ stringup execute /path/to/stringup/scenarios/description.rb
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
- assert_creates '/tmp/foo'
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
- assert_creates '/tmp/foo'
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
- ### assert_creates
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
- ### assert_removes
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.2.0
1
+ 0.3.0
@@ -1,5 +1,5 @@
1
1
  command 'puppet %s'
2
2
 
3
3
  scenario :creation, "Creates a file" do
4
- assert_creates '/tmp/foo'
4
+ assert_creates_file '/tmp/foo'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  command 'touch /tmp/foo'
2
2
 
3
3
  scenario :creation, "Creates a file" do
4
- assert_creates '/tmp/foo'
4
+ assert_creates_file '/tmp/foo'
5
5
  end
@@ -1,6 +1,6 @@
1
1
  module Stringup
2
- class FileCreatesAssertion < FileAssertion
3
- assertion :creates
2
+ class CreatesFileAssertion < FileAssertion
3
+ assertion :creates_file
4
4
 
5
5
  def before(test_case)
6
6
  test_case.assert !File.exist?(@path), "File already exists at #{@path}"
@@ -1,6 +1,6 @@
1
1
  module Stringup
2
- class FileRemovesAssertion < FileAssertion
3
- assertion :removes
2
+ class RemovesFileAssertion < FileAssertion
3
+ assertion :removes_file
4
4
 
5
5
  def after(test_case)
6
6
  test_case.assert !File.exist?(@path), "File still exists at #{@path}"
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
7
+ - 3
8
8
  - 0
9
- version: 0.2.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/file_creates_assertion.rb
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