citrusbyte-stories 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown CHANGED
@@ -72,12 +72,11 @@ You will get a nicely formatted PDF with your user stories. It uses [Prawn](http
72
72
  Installation
73
73
  ------------
74
74
 
75
- $ gem sources -a http://gems.github.com (you only have to do this once)
76
- $ sudo gem install citrusbyte-stories
75
+ $ sudo gem install stories
77
76
 
78
77
  If you want to use it with Rails, add this to config/environment.rb:
79
78
 
80
- config.gem "citrusbyte-stories", :lib => 'stories', :source => 'http://gems.github.com'
79
+ config.gem "stories"
81
80
 
82
81
  Then you can vendor the gem:
83
82
 
data/Rakefile CHANGED
@@ -1,11 +1,5 @@
1
1
  require 'rake'
2
- require 'rake/gempackagetask'
3
2
  require 'rake/testtask'
4
- require 'rake/clean'
5
-
6
- gem_spec_file = 'stories.gemspec'
7
-
8
- gem_spec = eval(File.read(gem_spec_file)) rescue nil
9
3
 
10
4
  task :default => :test
11
5
 
@@ -13,23 +7,3 @@ Rake::TestTask.new(:test) do |t|
13
7
  t.pattern = 'test/**/*_test.rb'
14
8
  t.verbose = false
15
9
  end
16
-
17
- Rake::GemPackageTask.new(gem_spec) do |pkg|
18
- pkg.need_zip = false
19
- pkg.need_tar = false
20
- rm_f FileList['pkg/**/*.*']
21
- end if gem_spec
22
-
23
- desc "Generate the gemspec file."
24
- task :gemspec do
25
- require 'erb'
26
-
27
- File.open(gem_spec_file, 'w') do |f|
28
- f.write ERB.new(File.read("#{gem_spec_file}.erb")).result(binding)
29
- end
30
- end
31
-
32
- desc "Builds and installs the gem."
33
- task :install => :repackage do
34
- `sudo gem install pkg/#{gem_spec.name}-#{gem_spec.version}.gem`
35
- end
@@ -12,7 +12,7 @@ class Test::Unit::TestCase
12
12
 
13
13
  original_story(name) do
14
14
  @@story = story
15
- instance_eval(&block)
15
+ class_eval(&block)
16
16
  end
17
17
 
18
18
  $stories << story
@@ -0,0 +1,17 @@
1
+ Rake::TestTask.new(:stories => "db:test:prepare") do |t|
2
+ t.libs << "test"
3
+ t.options = "--runner=stories"
4
+ t.pattern = 'test/integration/**/*_test.rb'
5
+ t.verbose = false
6
+ end
7
+ Rake::Task['stories'].comment = "Run and print the UATs"
8
+
9
+ namespace :stories do
10
+ Rake::TestTask.new(:pdf => "db:test:prepare") do |t|
11
+ t.libs << "test"
12
+ t.options = "--runner=stories-pdf"
13
+ t.pattern = 'test/integration/**/*_test.rb'
14
+ t.verbose = false
15
+ end
16
+ Rake::Task['stories:pdf'].comment = "Run UATs and produce a nice PDF"
17
+ end
data/test/all_test.rb CHANGED
@@ -14,4 +14,14 @@ class UserStoryTest < Test::Unit::TestCase
14
14
  assert_equal "valid user", @user
15
15
  end
16
16
  end
17
+
18
+ story "As a user I want helpers so that I can extract" do
19
+ def some_helper
20
+ 1
21
+ end
22
+
23
+ scenario "A call to a helper" do
24
+ assert_equal 1, some_helper
25
+ end
26
+ end
17
27
  end
data/test/pdf_test.rb CHANGED
@@ -13,7 +13,7 @@ end
13
13
  Test::Unit::AutoRunner::RUNNERS[:console] = Proc.new {|r| Stories::Runner::PDF }
14
14
 
15
15
  class UserStoryTest < Test::Unit::TestCase
16
- story "As a user I want to create stories so I can test if they pass" do
16
+ story "As a user I want to create stories with a custom PDF" do
17
17
  setup do
18
18
  @user = "valid user"
19
19
  end
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.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski
@@ -24,7 +24,9 @@ dependencies:
24
24
  version: 0.0.8
25
25
  version:
26
26
  description:
27
- email: michel@soveran.com
27
+ email:
28
+ - michel@soveran.com
29
+ - damian@dimaion.com
28
30
  executables: []
29
31
 
30
32
  extensions: []
@@ -32,6 +34,7 @@ extensions: []
32
34
  extra_rdoc_files: []
33
35
 
34
36
  files:
37
+ - lib/tasks/stories.rake
35
38
  - lib/stories/runner/pdf.rb
36
39
  - lib/stories/runner.rb
37
40
  - lib/stories.rb