citrusbyte-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 +4 -4
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: citrusbyte-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
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: "0.1"
|
25
25
|
version:
|
26
|
-
description:
|
26
|
+
description: Write Stories and User Acceptance Tests using Contest, the tiny add on to Test::Unit that provides nested contexts and declarative tests.
|
27
27
|
email:
|
28
28
|
- djanowski@dimaion.com
|
29
29
|
- michel@soveran.com
|
@@ -65,10 +65,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version:
|
66
66
|
requirements: []
|
67
67
|
|
68
|
-
rubyforge_project:
|
68
|
+
rubyforge_project: stories
|
69
69
|
rubygems_version: 1.2.0
|
70
70
|
signing_key:
|
71
71
|
specification_version: 2
|
72
|
-
summary: Write
|
72
|
+
summary: Write Stories and User Acceptance Tests using the minimalist testing framework Contest.
|
73
73
|
test_files: []
|
74
74
|
|