jeweler 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/.gitignore +1 -0
  2. data/README.markdown +28 -40
  3. data/Rakefile +25 -31
  4. data/VERSION.yml +3 -2
  5. data/bin/jeweler +1 -4
  6. data/features/generator/cucumber.feature +3 -3
  7. data/features/generator/directory_layout.feature +6 -6
  8. data/features/generator/git.feature +6 -6
  9. data/features/generator/rakefile.feature +17 -17
  10. data/features/generator/test.feature +10 -3
  11. data/features/generator/test_helper.feature +16 -9
  12. data/features/step_definitions/filesystem_steps.rb +2 -2
  13. data/features/step_definitions/generator_steps.rb +11 -4
  14. data/features/support/env.rb +1 -1
  15. data/features/tasks/version.feature +7 -0
  16. data/features/tasks/version_bumping.feature +16 -0
  17. data/jeweler.gemspec +60 -34
  18. data/lib/jeweler.rb +49 -27
  19. data/lib/jeweler/commands.rb +22 -14
  20. data/lib/jeweler/commands/build_gem.rb +6 -1
  21. data/lib/jeweler/commands/install_gem.rb +1 -1
  22. data/lib/jeweler/commands/release_to_git.rb +57 -0
  23. data/lib/jeweler/commands/{release.rb → release_to_github.rb} +2 -22
  24. data/lib/jeweler/commands/release_to_rubyforge.rb +4 -3
  25. data/lib/jeweler/commands/setup_rubyforge.rb +7 -1
  26. data/lib/jeweler/commands/version/write.rb +2 -2
  27. data/lib/jeweler/commands/write_gemspec.rb +5 -3
  28. data/lib/jeweler/gemcutter_tasks.rb +2 -1
  29. data/lib/jeweler/gemspec_helper.rb +27 -14
  30. data/lib/jeweler/generator.rb +60 -82
  31. data/lib/jeweler/generator/application.rb +5 -7
  32. data/lib/jeweler/generator/bacon_mixin.rb +1 -1
  33. data/lib/jeweler/generator/github_mixin.rb +29 -0
  34. data/lib/jeweler/generator/micronaut_mixin.rb +1 -1
  35. data/lib/jeweler/generator/minitest_mixin.rb +6 -6
  36. data/lib/jeweler/generator/options.rb +67 -11
  37. data/lib/jeweler/generator/riot_mixin.rb +42 -0
  38. data/lib/jeweler/generator/rspec_mixin.rb +1 -1
  39. data/lib/jeweler/generator/shoulda_mixin.rb +4 -4
  40. data/lib/jeweler/generator/testspec_mixin.rb +42 -0
  41. data/lib/jeweler/generator/testunit_mixin.rb +3 -3
  42. data/lib/jeweler/generator/yard_mixin.rb +1 -1
  43. data/lib/jeweler/rubyforge_tasks.rb +42 -24
  44. data/lib/jeweler/specification.rb +11 -5
  45. data/lib/jeweler/tasks.rb +78 -41
  46. data/lib/jeweler/templates/.gitignore +17 -1
  47. data/lib/jeweler/templates/Rakefile +4 -8
  48. data/lib/jeweler/templates/minitest/flunking.rb +2 -2
  49. data/lib/jeweler/templates/minitest/helper.rb +3 -3
  50. data/lib/jeweler/templates/riot/flunking.rb +11 -0
  51. data/lib/jeweler/templates/riot/helper.rb +3 -0
  52. data/lib/jeweler/templates/rspec/spec.opts +1 -0
  53. data/lib/jeweler/templates/shoulda/flunking.rb +2 -2
  54. data/lib/jeweler/templates/testspec/flunking.rb +7 -0
  55. data/lib/jeweler/templates/testspec/helper.rb +7 -0
  56. data/lib/jeweler/templates/testunit/flunking.rb +2 -2
  57. data/lib/jeweler/version_helper.rb +14 -5
  58. data/test/fixtures/existing-project-with-version-constant/.document +5 -0
  59. data/test/fixtures/existing-project-with-version-constant/.gitignore +5 -0
  60. data/test/fixtures/existing-project-with-version-constant/LICENSE +20 -0
  61. data/test/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
  62. data/test/fixtures/existing-project-with-version-constant/Rakefile +83 -0
  63. data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +29 -0
  64. data/test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
  65. data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
  66. data/test/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -0
  67. data/test/jeweler/commands/test_build_gem.rb +54 -23
  68. data/test/jeweler/commands/test_install_gem.rb +4 -4
  69. data/test/jeweler/commands/test_release_to_git.rb +201 -0
  70. data/test/jeweler/commands/{test_release.rb → test_release_to_github.rb} +10 -49
  71. data/test/jeweler/commands/test_release_to_rubyforge.rb +0 -4
  72. data/test/jeweler/commands/test_setup_rubyforge.rb +0 -4
  73. data/test/jeweler/commands/test_write_gemspec.rb +11 -2
  74. data/test/jeweler/commands/version/test_write.rb +1 -2
  75. data/test/{test_application.rb → jeweler/generator/test_application.rb} +23 -50
  76. data/test/{test_options.rb → jeweler/generator/test_options.rb} +72 -8
  77. data/test/{test_gemspec_helper.rb → jeweler/test_gemspec_helper.rb} +5 -1
  78. data/test/{test_generator.rb → jeweler/test_generator.rb} +32 -76
  79. data/test/{test_generator_initialization.rb → jeweler/test_generator_initialization.rb} +43 -35
  80. data/test/{test_generator_mixins.rb → jeweler/test_generator_mixins.rb} +8 -3
  81. data/test/{test_specification.rb → jeweler/test_specification.rb} +0 -0
  82. data/test/jeweler/test_tasks.rb +50 -0
  83. data/test/{test_version_helper.rb → jeweler/test_version_helper.rb} +66 -5
  84. data/test/test_helper.rb +20 -2
  85. data/test/test_jeweler.rb +21 -8
  86. metadata +58 -26
  87. data/ROADMAP +0 -12
  88. data/test/test_tasks.rb +0 -35
data/.gitignore CHANGED
@@ -4,6 +4,7 @@ doc
4
4
  rdoc
5
5
  tags
6
6
  test/tmp
7
+ test/jeweler/version_tmp
7
8
  test/version_tmp
8
9
  tmp
9
10
  .yardoc
@@ -39,7 +39,7 @@ The yield object here, `gemspec`, is a `Gem::Specification` object. See the [Cus
39
39
 
40
40
  ## Using to start a new project
41
41
 
42
- Jeweler provides a generator. It requires you to [setup your name and email for git](http://github.com/guides/tell-git-your-user-name-and-email-address) and [your username and token for GitHub](http://github.com/guides/local-github-config).
42
+ Jeweler provides a generator. It requires you to [setup your name and email for git](http://help.github.com/git-email-settings/) and [your username and token for GitHub](http://github.com/guides/local-github-config).
43
43
 
44
44
  jeweler the-perfect-gem
45
45
 
@@ -105,7 +105,22 @@ Jeweler can also handle releasing to [Gemcutter](http://gemcutter.org). There ar
105
105
 
106
106
  * [Create an account on Gemcutter](http://gemcutter.org/sign_up)
107
107
  * Install the Gemcutter gem: sudo gem install gemcutter
108
- * Run 'gemcutter tumble' to set up gemcutter
108
+ * Run 'gemcutter tumble' to set up RubyGems to use gemcutter as the default source
109
+ * Update your Rakefile to make an instance of `Jeweler::GemcutterTasks`
110
+
111
+
112
+ A Rakefile setup for gemcutter would include something like this:
113
+
114
+ begin
115
+ require 'jeweler'
116
+ Jeweler::Tasks.new do |gem|
117
+ # ommitted for brevity
118
+ end
119
+ Jeweler::GemcutterTasks.new
120
+ rescue LoadError
121
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
122
+ end
123
+
109
124
 
110
125
  With all that setup out of the way, you can now release to Gemcutter with impunity. This would release the current version of your gem.
111
126
 
@@ -116,59 +131,32 @@ With all that setup out of the way, you can now release to Gemcutter with impuni
116
131
  Jeweler can also handle releasing to [RubyForge](http://rubyforge.org). There are a few steps you need to do before doing any RubyForge releases with Jeweler:
117
132
 
118
133
  * [Create an account on RubyForge](http://rubyforge.org/account/register.php)
119
- * Request a project on RubyForge. This involves waiting for a project approval, which can take any amount of time from a few hours to a week
120
- * You might want to create an umbrella project where you can publish your gems, instead of one project per gem
134
+ * Request a project on RubyForge.
121
135
  * Install the RubyForge gem: sudo gem install rubyforge
122
136
  * Run 'rubyforge setup' and fill in your username and password for RubyForge
123
137
  * Run 'rubyforge config' to pull down information about your projects
124
138
  * Run 'rubyforge login' to make sure you are able to login
139
+ * In Jeweler::Tasks, you must set `rubyforge_project` to the project you just created
140
+ * Add Jeweler::RubyforgeTasks to bring in the appropriate tasks.
141
+ * Note, using `jeweler --rubyforge` when generating the project does this for you automatically.
125
142
 
126
- With this in place, you now update your Jeweler::Tasks to setup `rubyforge_project` with the RubyForge project you've just created. (Note, using `jeweler --rubyforge` when generating the project does this for you automatically.)
143
+ A Rakefile setup for rubyforge would include something like this:
127
144
 
128
145
  begin
129
146
  require 'jeweler'
130
147
  Jeweler::Tasks.new do |s|
131
- s.name = "the-perfect-gem"
132
- s.summary = "TODO"
133
- s.description = "TODO"
134
- s.email = "josh@technicalpickles.com"
135
- s.homepage = "http://github.com/technicalpickles/the-perfect-gem"
136
- s.description = "TODO"
137
- s.authors = ["Josh Nichols"]
148
+ # ommitted for brevity
138
149
  s.rubyforge_project = 'the-perfect-gem' # This line would be new
139
150
  end
140
- rescue LoadError
141
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
142
- end
143
151
 
144
- # These are new tasks
145
- begin
146
- require 'rake/contrib/sshpublisher'
147
- namespace :rubyforge do
148
-
149
- desc "Release gem and RDoc documentation to RubyForge"
150
- task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
151
-
152
- namespace :release do
153
- desc "Publish RDoc to RubyForge."
154
- task :docs => [:rdoc] do
155
- config = YAML.load(
156
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
157
- )
158
-
159
- host = "#{config['username']}@rubyforge.org"
160
- remote_dir = "/var/www/gforge-projects/the-perfect-gem/"
161
- local_dir = 'rdoc'
162
-
163
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
164
- end
165
- end
152
+ Jeweler::RubyforgeTasks.new do |rubyforge|
153
+ rubyforge.doc_task = "rdoc"
166
154
  end
167
155
  rescue LoadError
168
- puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
156
+ puts "Jeweler, or a dependency, not available. Install it with: sudo gem install jeweler"
169
157
  end
170
158
 
171
- Now you must initially create a 'package' for your gem in your 'project':
159
+ Now you must initially create a 'package' for your gem in your RubyForge 'project':
172
160
 
173
161
  $ rake rubyforge:setup
174
162
 
@@ -176,7 +164,7 @@ With all that setup out of the way, you can now release to RubyForge with impuni
176
164
 
177
165
  $ rake rubyforge:release
178
166
 
179
- ## Workflow
167
+ ## Release Workflow
180
168
 
181
169
  * Hack, commit, hack, commit, etc, etc
182
170
  * `rake version:bump:patch release` to do the actual version bump and release
data/Rakefile CHANGED
@@ -2,39 +2,33 @@ require 'rake'
2
2
 
3
3
  $LOAD_PATH.unshift('lib')
4
4
 
5
- gem 'git'
6
- require 'git'
7
-
8
- begin
9
- require 'jeweler'
10
- Jeweler::Tasks.new do |gem|
11
- gem.name = "jeweler"
12
- gem.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
13
- gem.email = "josh@technicalpickles.com"
14
- gem.homepage = "http://github.com/technicalpickles/jeweler"
15
- gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
16
- gem.authors = ["Josh Nichols"]
17
- gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
18
-
19
- gem.add_dependency "git", ">= 1.2.1"
20
- gem.add_dependency "rubyforge"
21
-
22
- gem.rubyforge_project = "pickles"
23
-
24
- gem.add_development_dependency "thoughtbot-shoulda"
25
- gem.add_development_dependency "mhennemeyer-output_catcher"
26
- gem.add_development_dependency "rr"
27
- gem.add_development_dependency "mocha"
28
- gem.add_development_dependency "redgreen"
29
- end
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "jeweler"
8
+ gem.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
9
+ gem.email = "josh@technicalpickles.com"
10
+ gem.homepage = "http://github.com/technicalpickles/jeweler"
11
+ gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
12
+ gem.authors = ["Josh Nichols"]
13
+ gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
14
+
15
+ gem.add_dependency "git", ">= 1.2.5"
16
+ gem.add_dependency "rubyforge", ">= 2.0.0"
17
+ gem.add_dependency "gemcutter", ">= 0.1.0"
18
+
19
+ gem.rubyforge_project = "pickles"
20
+
21
+ gem.add_development_dependency "thoughtbot-shoulda"
22
+ gem.add_development_dependency "mhennemeyer-output_catcher"
23
+ gem.add_development_dependency "rr"
24
+ gem.add_development_dependency "mocha"
25
+ gem.add_development_dependency "redgreen"
26
+ end
30
27
 
31
- Jeweler::GemcutterTasks.new
28
+ Jeweler::GemcutterTasks.new
32
29
 
33
- Jeweler::RubyforgeTasks.new do |t|
34
- t.doc_task = :yardoc
35
- end
36
- rescue LoadError
37
- puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
30
+ Jeweler::RubyforgeTasks.new do |t|
31
+ t.doc_task = :yardoc
38
32
  end
39
33
 
40
34
 
@@ -1,4 +1,5 @@
1
1
  ---
2
- :minor: 2
3
- :patch: 1
2
+ :patch: 0
4
3
  :major: 1
4
+ :minor: 3
5
+ :build:
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'optparse'
4
-
5
2
  $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
6
- require 'jeweler'
3
+ require 'jeweler/generator'
7
4
 
8
5
  Jeweler::Generator::Application.run!(*ARGV)
@@ -12,7 +12,7 @@ Feature: generating cucumber stories
12
12
  And a file named 'the-perfect-gem/features/the-perfect-gem.feature' is not created
13
13
  And a file named 'the-perfect-gem/features/support/env.rb' is not created
14
14
  And a file named 'the-perfect-gem/features/steps/the-perfect-gem_steps.rb' is not created
15
-
15
+
16
16
  Scenario: basic cucumber setup
17
17
  Given a working directory
18
18
  And I have configured git sanely
@@ -60,8 +60,8 @@ Feature: generating cucumber stories
60
60
  And I want cucumber stories
61
61
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
62
62
 
63
- Then 'features/support/env.rb' requires 'mini/test'
64
- And cucumber world extends "Mini::Test::Assertions"
63
+ Then 'features/support/env.rb' requires 'minitest/unit'
64
+ And cucumber world extends "MiniTest::Assertions"
65
65
 
66
66
  Scenario: cucumber setup for rspec
67
67
  Given a working directory
@@ -32,8 +32,8 @@ Feature: generated directory layout
32
32
 
33
33
  Then a directory named 'the-perfect-gem/test' is created
34
34
 
35
- And a file named 'the-perfect-gem/test/test_helper.rb' is created
36
- And a file named 'the-perfect-gem/test/the-perfect-gem_test.rb' is created
35
+ And a file named 'the-perfect-gem/test/helper.rb' is created
36
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
37
37
 
38
38
  Scenario: rspec
39
39
  Given a working directory
@@ -52,8 +52,8 @@ Feature: generated directory layout
52
52
 
53
53
  Then a directory named 'the-perfect-gem/test' is created
54
54
 
55
- And a file named 'the-perfect-gem/test/test_helper.rb' is created
56
- And a file named 'the-perfect-gem/test/the-perfect-gem_test.rb' is created
55
+ And a file named 'the-perfect-gem/test/helper.rb' is created
56
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
57
57
 
58
58
  Scenario: testunit
59
59
  Given a working directory
@@ -62,8 +62,8 @@ Feature: generated directory layout
62
62
 
63
63
  Then a directory named 'the-perfect-gem/test' is created
64
64
 
65
- And a file named 'the-perfect-gem/test/test_helper.rb' is created
66
- And a file named 'the-perfect-gem/test/the-perfect-gem_test.rb' is created
65
+ And a file named 'the-perfect-gem/test/helper.rb' is created
66
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
67
67
 
68
68
  Scenario: micronaut
69
69
  Given a working directory
@@ -48,8 +48,8 @@ Feature: git support
48
48
  And I have configured git sanely
49
49
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
50
50
 
51
- Then 'test/test_helper.rb' was checked in
52
- And 'test/the-perfect-gem_test.rb' was checked in
51
+ Then 'test/helper.rb' was checked in
52
+ And 'test/test_the-perfect-gem.rb' was checked in
53
53
 
54
54
  Scenario: rspec
55
55
  Given a working directory
@@ -64,16 +64,16 @@ Feature: git support
64
64
  And I have configured git sanely
65
65
  When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
66
66
 
67
- Then 'test/test_helper.rb' was checked in
68
- And 'test/the-perfect-gem_test.rb' was checked in
67
+ Then 'test/helper.rb' was checked in
68
+ And 'test/test_the-perfect-gem.rb' was checked in
69
69
 
70
70
  Scenario: testunit
71
71
  Given a working directory
72
72
  And I have configured git sanely
73
73
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
74
74
 
75
- Then 'test/test_helper.rb' was checked in
76
- And 'test/the-perfect-gem_test.rb' was checked in
75
+ Then 'test/helper.rb' was checked in
76
+ And 'test/test_the-perfect-gem.rb' was checked in
77
77
 
78
78
  Scenario: micronaut
79
79
  Given a working directory
@@ -22,7 +22,7 @@ Feature: generated Rakefile
22
22
  Scenario: bacon
23
23
  When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
24
24
 
25
-
25
+
26
26
  Then 'Rakefile' requires 'rcov/rcovtask'
27
27
  And Rakefile has 'spec/**/*_spec.rb' for the Rake::TestTask pattern
28
28
  And Rakefile has 'spec/**/*_spec.rb' for the Rcov::RcovTask pattern
@@ -33,8 +33,8 @@ Feature: generated Rakefile
33
33
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
34
34
 
35
35
  Then 'Rakefile' requires 'rcov/rcovtask'
36
- And Rakefile has 'test/**/*_test.rb' for the Rake::TestTask pattern
37
- And Rakefile has 'test/**/*_test.rb' for the Rcov::RcovTask pattern
36
+ And Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
37
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
38
38
  And Rakefile has 'test' in the Rcov::RcovTask libs
39
39
  And Rakefile has "test" as the default task
40
40
 
@@ -49,8 +49,8 @@ Feature: generated Rakefile
49
49
  When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
50
50
 
51
51
  Then 'Rakefile' requires 'rcov/rcovtask'
52
- And Rakefile has 'test/**/*_test.rb' for the Rake::TestTask pattern
53
- And Rakefile has 'test/**/*_test.rb' for the Rcov::RcovTask pattern
52
+ And Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
53
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
54
54
  And Rakefile has 'test' in the Rcov::RcovTask libs
55
55
  And Rakefile has "test" as the default task
56
56
 
@@ -65,47 +65,47 @@ Feature: generated Rakefile
65
65
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
66
66
 
67
67
  Then 'Rakefile' requires 'rcov/rcovtask'
68
- Then Rakefile has 'test/**/*_test.rb' for the Rake::TestTask pattern
69
- And Rakefile has 'test/**/*_test.rb' for the Rcov::RcovTask pattern
68
+ Then Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
69
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
70
70
  And Rakefile has 'test' in the Rcov::RcovTask libs
71
71
  And Rakefile has "test" as the default task
72
72
 
73
73
  Scenario: no cucumber
74
74
  Given I do not want cucumber stories
75
75
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
76
- Then Rakefile does not require 'cucumber/rake/task'
76
+ Then Rakefile does not require 'cucumber/rake/task'
77
77
  And Rakefile does not instantiate a Cucumber::Rake::Task
78
78
 
79
79
  Scenario: cucumber
80
80
  Given I want cucumber stories
81
81
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
82
- Then Rakefile requires 'cucumber/rake/task'
82
+ Then Rakefile requires 'cucumber/rake/task'
83
83
  And Rakefile instantiates a Cucumber::Rake::Task
84
84
 
85
85
  Scenario: no reek
86
86
  Given I do not want reek
87
87
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
88
- Then Rakefile does not require 'reek/rake_task'
88
+ Then Rakefile does not require 'reek/rake_task'
89
89
  And Rakefile does not instantiate a Reek::RakeTask
90
90
 
91
91
  Scenario: reek
92
92
  Given I want reek
93
93
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
94
- Then Rakefile requires 'reek/rake_task'
94
+ Then Rakefile requires 'reek/rake_task'
95
95
  And Rakefile instantiates a Reek::RakeTask
96
96
 
97
97
  Scenario: no roodi
98
98
  Given I do not want roodi
99
99
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
100
- Then Rakefile does not require 'roodi'
101
- And Rakefile does not require 'roodi_task'
100
+ Then Rakefile does not require 'roodi'
101
+ And Rakefile does not require 'roodi_task'
102
102
  And Rakefile does not instantiate a RoodiTask
103
103
 
104
104
  Scenario: roodi
105
105
  Given I want roodi
106
106
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
107
- Then Rakefile requires 'roodi'
108
- And Rakefile requires 'roodi_task'
107
+ Then Rakefile requires 'roodi'
108
+ And Rakefile requires 'roodi_task'
109
109
  And Rakefile instantiates a RoodiTask
110
110
 
111
111
  Scenario: no rubyforge
@@ -121,7 +121,7 @@ Feature: generated Rakefile
121
121
  Scenario: yard
122
122
  Given I want to use yard instead of rdoc
123
123
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
124
-
124
+
125
125
  Then 'Rakefile' does not require 'rake/rdoctask'
126
126
  And 'Rakefile' requires 'yard'
127
127
  And Rakefile instantiates a YARD::Rake::YardocTask
@@ -129,7 +129,7 @@ Feature: generated Rakefile
129
129
  Scenario: rdoc
130
130
  Given I want to use rdoc instead of yard
131
131
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
132
-
132
+
133
133
  Then 'Rakefile' does not require 'yard'
134
134
  And 'Rakefile' requires 'rake/rdoctask'
135
135
  And Rakefile does not instantiate a YARD::Rake::YardocTask
@@ -13,7 +13,7 @@ Feature: generated test or spec
13
13
  Given a working directory
14
14
  And I have configured git sanely
15
15
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
16
- Then 'test/the-perfect-gem_test.rb' should define 'ThePerfectGemTest' as a subclass of 'Mini::Test::TestCase'
16
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'MiniTest::Unit::TestCase'
17
17
 
18
18
  Scenario: rspec
19
19
  Given a working directory
@@ -26,16 +26,23 @@ Feature: generated test or spec
26
26
  And I have configured git sanely
27
27
  And I intend to test with shoulda
28
28
  When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
29
- Then 'test/the-perfect-gem_test.rb' should define 'ThePerfectGemTest' as a subclass of 'Test::Unit::TestCase'
29
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'Test::Unit::TestCase'
30
30
 
31
31
  Scenario: testunit
32
32
  Given a working directory
33
33
  And I have configured git sanely
34
34
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
35
- Then 'test/the-perfect-gem_test.rb' should define 'ThePerfectGemTest' as a subclass of 'Test::Unit::TestCase'
35
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'Test::Unit::TestCase'
36
36
 
37
37
  Scenario: micronaut
38
38
  Given a working directory
39
39
  And I have configured git sanely
40
40
  When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
41
41
  Then 'examples/the-perfect-gem_example.rb' should describe 'ThePerfectGem'
42
+
43
+ Scenario: riot
44
+ Given a working directory
45
+ And I have configured git sanely
46
+ When I generate a riot project named 'the-perfect-gem' that is 'zomg, so good'
47
+ Then 'test/the-perfect-gem_test.rb' should contextualize 'the-perfect-gem'
48
+ And 'test/the-perfect-gem_test.rb' requires 'teststrap'
@@ -14,9 +14,9 @@ Feature: generated test or spec
14
14
  Given a working directory
15
15
  And I have configured git sanely
16
16
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
17
- Then 'test/test_helper.rb' requires 'mini/test'
18
- And 'test/test_helper.rb' requires 'the-perfect-gem'
19
- And 'test/test_helper.rb' should autorun tests
17
+ Then 'test/helper.rb' requires 'minitest/unit'
18
+ And 'test/helper.rb' requires 'the-perfect-gem'
19
+ And 'test/helper.rb' should autorun tests
20
20
 
21
21
  Scenario: rspec
22
22
  Given a working directory
@@ -29,17 +29,17 @@ Feature: generated test or spec
29
29
  Given a working directory
30
30
  And I have configured git sanely
31
31
  When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
32
- Then 'test/test_helper.rb' requires 'test/unit'
33
- And 'test/test_helper.rb' requires 'shoulda'
34
- And 'test/test_helper.rb' requires 'the-perfect-gem'
32
+ Then 'test/helper.rb' requires 'test/unit'
33
+ And 'test/helper.rb' requires 'shoulda'
34
+ And 'test/helper.rb' requires 'the-perfect-gem'
35
35
 
36
36
  Scenario: testunit
37
37
  Given a working directory
38
38
  And I have configured git sanely
39
39
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
40
- Then 'test/test_helper.rb' requires 'test/unit'
41
- And 'test/test_helper.rb' requires 'the-perfect-gem'
42
-
40
+ Then 'test/helper.rb' requires 'test/unit'
41
+ And 'test/helper.rb' requires 'the-perfect-gem'
42
+
43
43
  Scenario: micronaut
44
44
  Given a working directory
45
45
  And I have configured git sanely
@@ -47,3 +47,10 @@ Feature: generated test or spec
47
47
  Then 'examples/example_helper.rb' requires 'rubygems'
48
48
  Then 'examples/example_helper.rb' requires 'micronaut'
49
49
  Then 'examples/example_helper.rb' requires 'the-perfect-gem'
50
+
51
+ Scenario: riot
52
+ Given a working directory
53
+ And I have configured git sanely
54
+ When I generate a riot project named 'the-perfect-gem' that is 'zomg, so good'
55
+ Then 'test/teststrap.rb' requires 'riot'
56
+ And 'test/teststrap.rb' requires 'the-perfect-gem'