stories 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -1,6 +1,10 @@
1
1
  require "rubygems"
2
2
  require "contest"
3
3
 
4
+ unless defined?(Test::Unit::AutoRunner)
5
+ gem "test-unit", ">= 1.2"
6
+ end
7
+
4
8
  class Test::Unit::TestCase
5
9
  class << self
6
10
  alias story context
@@ -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
- class_eval(&block)
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
- @@story.scenarios << scenario
34
+ self.story.scenarios << scenario
30
35
  end
31
36
  end
32
37
  end
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  gem "prawn", "~> 0.4"
2
4
  require "prawn"
3
5
 
@@ -24,4 +24,6 @@ class UserStoryTest < Test::Unit::TestCase
24
24
  assert_equal 1, some_helper
25
25
  end
26
26
  end
27
+
28
+ story "Pending story"
27
29
  end
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.9
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-11 00:00:00 -03:00
13
+ date: 2009-06-18 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency