stories 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +16 -0
- data/lib/stories.rb +4 -0
- data/lib/stories/runner.rb +7 -2
- data/lib/stories/runner/pdf.rb +2 -0
- data/test/all_test.rb +2 -0
- metadata +2 -2
data/README.markdown
CHANGED
@@ -56,6 +56,17 @@ Or with a regular expression:
|
|
56
56
|
|
57
57
|
$ ruby my_test.rb -n /yet_more_tests/
|
58
58
|
|
59
|
+
Pending stories
|
60
|
+
---------------
|
61
|
+
|
62
|
+
Since Stories aims to improve your project's documentation, you can have pending stories:
|
63
|
+
|
64
|
+
class UserStoryTest < Test::Unit::TestCase
|
65
|
+
story "As a user I want to create stories so I can test if they pass"
|
66
|
+
end
|
67
|
+
|
68
|
+
This is useful if you want to write all your stories upfront, even before you write the acceptance tests.
|
69
|
+
|
59
70
|
Awesome output
|
60
71
|
--------------
|
61
72
|
|
@@ -69,6 +80,11 @@ Now, if you want to impress everyone around you, try this:
|
|
69
80
|
|
70
81
|
You will get a nicely formatted PDF with your user stories. It uses [Prawn](http://prawn.majesticseacreature.com/), so you will need to install it first.
|
71
82
|
|
83
|
+
If you're using Rails, you can run the whole build with the following Rake tasks:
|
84
|
+
|
85
|
+
$ rake stories
|
86
|
+
$ rake stories:pdf
|
87
|
+
|
72
88
|
Installation
|
73
89
|
------------
|
74
90
|
|
data/lib/stories.rb
CHANGED
data/lib/stories/runner.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'test/unit/ui/console/testrunner'
|
2
4
|
|
3
5
|
$stories = []
|
@@ -12,7 +14,10 @@ class Test::Unit::TestCase
|
|
12
14
|
|
13
15
|
original_story(name) do
|
14
16
|
@@story = story
|
15
|
-
|
17
|
+
|
18
|
+
def self.story; @@story; end
|
19
|
+
|
20
|
+
class_eval(&block) if block_given?
|
16
21
|
end
|
17
22
|
|
18
23
|
$stories << story
|
@@ -26,7 +31,7 @@ class Test::Unit::TestCase
|
|
26
31
|
instance_eval(&block)
|
27
32
|
end
|
28
33
|
|
29
|
-
|
34
|
+
self.story.scenarios << scenario
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
data/lib/stories/runner/pdf.rb
CHANGED
data/test/all_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damian Janowski
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-06-
|
13
|
+
date: 2009-06-18 00:00:00 -03:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|