newgem 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/History.txt +9 -0
  2. data/Manifest.txt +9 -1
  3. data/Rakefile +2 -1
  4. data/TODO.markdown +9 -3
  5. data/app_generators/newgem/newgem_generator.rb +5 -1
  6. data/app_generators/newgem/templates/README.rdoc +1 -1
  7. data/app_generators/newgem/templates/Rakefile +2 -1
  8. data/app_generators/newgem_simple/templates/Rakefile +1 -1
  9. data/bin/newgem +1 -1
  10. data/features/development.feature +5 -5
  11. data/features/executable_generator.feature +46 -29
  12. data/features/extconf.feature +27 -26
  13. data/features/install_cucumber.feature +29 -19
  14. data/features/install_website.feature +6 -6
  15. data/features/newgem_cli.feature +86 -42
  16. data/features/rubygem_tasks.feature +26 -18
  17. data/features/step_definitions/cli_steps.rb +22 -17
  18. data/features/step_definitions/common_steps.rb +45 -67
  19. data/features/step_definitions/rubygems_steps.rb +1 -1
  20. data/features/support/cli.rb +8 -0
  21. data/features/support/common.rb +29 -0
  22. data/features/support/env.rb +2 -7
  23. data/features/support/matchers.rb +11 -0
  24. data/lib/newgem.rb +1 -1
  25. data/lib/newgem/rubyforge-ext.rb +1 -1
  26. data/newgem_generators/install_website/install_website_generator.rb +1 -1
  27. data/newgem_generators/install_website/templates/features/website.feature +4 -4
  28. data/newgem_theme_generators/long_box_theme/long_box_theme_generator.rb +1 -1
  29. data/rubygems_generators/executable/executable_generator.rb +1 -1
  30. data/rubygems_generators/executable/templates/spec/cli_spec.rb.erb +2 -2
  31. data/rubygems_generators/executable/templates/test/test_cli.rb.erb +2 -2
  32. data/rubygems_generators/extconf/extconf_generator.rb +1 -1
  33. data/rubygems_generators/install_cucumber/install_cucumber_generator.rb +2 -0
  34. data/rubygems_generators/install_cucumber/templates/features/development.feature +5 -5
  35. data/rubygems_generators/install_cucumber/templates/features/step_definitions/common_steps.rb +45 -67
  36. data/rubygems_generators/install_cucumber/templates/features/support/common.rb +29 -0
  37. data/rubygems_generators/install_rspec/install_rspec_generator.rb +1 -1
  38. data/rubygems_generators/install_rspec/templates/spec.rb +1 -1
  39. data/rubygems_generators/install_rspec/templates/spec/spec_helper.rb +1 -1
  40. data/rubygems_generators/install_rspec/templates/tasks/rspec.rake +1 -1
  41. data/rubygems_generators/install_shoulda/USAGE +5 -0
  42. data/rubygems_generators/install_shoulda/install_shoulda_generator.rb +35 -0
  43. data/rubygems_generators/install_shoulda/templates/tasks/shoulda.rake +15 -0
  44. data/rubygems_generators/install_shoulda/templates/test/test.rb +13 -0
  45. data/rubygems_generators/install_shoulda/templates/test/test_helper.rb +9 -0
  46. data/rubygems_generators/install_test_unit/install_test_unit_generator.rb +1 -1
  47. data/script/destroy +1 -1
  48. data/script/generate +1 -1
  49. data/test/test_generator_helper.rb +1 -1
  50. data/website/index.html +2 -2
  51. data/website/rubyforge.html +2 -2
  52. metadata +21 -6
  53. data/features/expected_outputs/newgem.out +0 -27
@@ -3,25 +3,33 @@ Feature: Generated RubyGems have various rake tasks to aide their development
3
3
  As a RubyGem developer
4
4
  I want rake tasks to perform routine maintenance and deployment tasks
5
5
 
6
+ Scenario: Generate a gemspec that can build the RubyGem
7
+ Given default env variables setup for name and email
8
+ And an existing newgem scaffold [called "my_project"]
9
+ And "pkg" folder is deleted
10
+ When I invoke task "rake gemspec"
11
+ Then file "my_project.gemspec" is created
12
+ And gemspec builds the RubyGem successfully
13
+ Then I should see
14
+ """
15
+ Successfully built RubyGem
16
+ """
17
+
6
18
  Scenario: Generate RubyGem
7
- Given an existing newgem scaffold [called 'my_project']
8
- And 'pkg' folder is deleted
9
- When task 'rake gem' is invoked
10
- Then folder 'pkg' is created
11
- And file with name matching 'pkg/my_project-0.0.1.gem' is created
12
- And gem spec key 'rdoc_options' contains /--mainREADME.rdoc/
13
- And gem spec key 'dependencies' contains /newgem \(>= [\d.]+, development\)/
19
+ Given default env variables setup for name and email
20
+ And an existing newgem scaffold [called "my_project"]
21
+ And "pkg" folder is deleted
22
+ When I invoke task "rake gem"
23
+ Then folder "pkg" is created
24
+ And file with name matching "pkg/my_project-0.0.1.gem" is created
25
+ And gem spec key "rdoc_options" contains /--mainREADME.rdoc/
26
+ And gem spec key "dependencies" contains /newgem \(>= [\d.]+, development\)/
14
27
 
15
28
  Scenario: Hoe does not bitch about README.txt being missing
16
- Given an existing newgem scaffold [called 'my_project'] that has 'README.rdoc' not 'README.txt'
17
- When task 'rake -T' is invoked
18
- Then output does not match /README.txt is missing/
29
+ Given an existing newgem scaffold [called "my_project"] that has "README.rdoc" not "README.txt"
30
+ When I invoke task "rake -T"
31
+ Then I should not see
32
+ """
33
+ README.txt is missing
34
+ """
19
35
 
20
- Scenario: Generate a gemspec that can build the RubyGem
21
- Given an existing newgem scaffold [called 'my_project']
22
- And 'pkg' folder is deleted
23
- When task 'rake gemspec' is invoked
24
- Then file 'my_project.gemspec' is created
25
- And gemspec builds the RubyGem successfully
26
- And output does match /Successfully built RubyGem/
27
-
@@ -1,8 +1,9 @@
1
- def in_tmp_folder(&block)
2
- FileUtils.chdir(@tmp_root, &block)
1
+ Given /^default env variables setup for name and email$/ do
2
+ Given 'env variable $NAME set to "Dr Nic"'
3
+ Given 'env variable $EMAIL set to "drnicwilliams@gmail.com"'
3
4
  end
4
5
 
5
- Given %r{^an existing newgem scaffold \[called '(.*)'\]} do |project_name|
6
+ Given /^an existing newgem scaffold \[called "(.*)"\]/ do |project_name|
6
7
  Given "a safe folder"
7
8
  newgem = File.expand_path(File.dirname(__FILE__) + "/../../bin/newgem")
8
9
  setup_active_project_folder project_name
@@ -13,7 +14,7 @@ Given %r{^an existing newgem scaffold \[called '(.*)'\]} do |project_name|
13
14
  end
14
15
  end
15
16
 
16
- Given %r{^an existing newgem scaffold using options '(.*)' \[called '(.*)'\]} do |arguments, project_name|
17
+ Given /^an existing newgem scaffold using options "(.*)" \[called "(.*)"\]/ do |arguments, project_name|
17
18
  Given "a safe folder"
18
19
  newgem = File.expand_path(File.dirname(__FILE__) + "/../../bin/newgem")
19
20
  setup_active_project_folder project_name
@@ -24,7 +25,7 @@ Given %r{^an existing newgem scaffold using options '(.*)' \[called '(.*)'\]} do
24
25
  end
25
26
  end
26
27
 
27
- Given %r{^project website configuration for safe folder on local machine$} do
28
+ Given /^project website configuration for safe folder on local machine$/ do
28
29
  @remote_folder = File.expand_path(File.join(@tmp_root, 'website'))
29
30
  FileUtils.rm_rf @remote_folder
30
31
  FileUtils.mkdir_p @remote_folder
@@ -36,7 +37,7 @@ Given %r{^project website configuration for safe folder on local machine$} do
36
37
  end
37
38
  end
38
39
 
39
- Given %r{^~\/([^\s]+) contains (\{.*\})$} do |file, config|
40
+ Given /^~\/([^\s]+) contains (\{.*\})$/ do |file, config|
40
41
  in_home_folder do
41
42
  File.open(file, 'w') do |f|
42
43
  yaml = eval(config)
@@ -45,11 +46,7 @@ Given %r{^~\/([^\s]+) contains (\{.*\})$} do |file, config|
45
46
  end
46
47
  end
47
48
 
48
- def newgem_cmd
49
- File.expand_path(File.dirname(__FILE__) + "/../../bin/newgem")
50
- end
51
-
52
- When %r{^newgem is executed for project '(.*)' with no options$} do |project_name|
49
+ When /^newgem is executed for project "(.*)" with no options$/ do |project_name|
53
50
  @newgem_cmd = newgem_cmd
54
51
  setup_active_project_folder project_name
55
52
  in_tmp_folder do
@@ -59,7 +56,7 @@ When %r{^newgem is executed for project '(.*)' with no options$} do |project_nam
59
56
  end
60
57
  end
61
58
 
62
- When %r{^newgem is executed for project '(.*)' with options '(.*)'$} do |project_name, arguments|
59
+ When /^newgem is executed for project "(.*)" with options "(.*)"$/ do |project_name, arguments|
63
60
  @newgem_cmd = newgem_cmd
64
61
  setup_active_project_folder project_name
65
62
  in_tmp_folder do
@@ -69,7 +66,7 @@ When %r{^newgem is executed for project '(.*)' with options '(.*)'$} do |project
69
66
  end
70
67
  end
71
68
 
72
- When /^newgem is executed only with options '(.*)'$/ do |arguments|
69
+ When /^newgem is executed only with options "(.*)"$/ do |arguments|
73
70
  @newgem_cmd = newgem_cmd
74
71
  in_tmp_folder do
75
72
  @stdout = File.expand_path("newgem.out")
@@ -78,20 +75,28 @@ When /^newgem is executed only with options '(.*)'$/ do |arguments|
78
75
  end
79
76
 
80
77
 
81
- When /^run unit tests for test file '(.*)'$/ do |test_file|
78
+ When /^I run unit tests for test file "(.*)"$/ do |test_file|
82
79
  @stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
83
- FileUtils.chdir(@active_project_folder) do
80
+ in_project_folder do
84
81
  system "ruby #{test_file} > #{@stdout}"
85
82
  end
86
83
  end
87
84
 
88
- Then %r{^remote folder '(.*)' is created} do |folder|
85
+ When /^I enable rspec autorun$/ do
86
+ in_project_folder do
87
+ File.open("spec/spec_helper.rb", "a") do |f|
88
+ f << "require 'spec/autorun'"
89
+ end
90
+ end
91
+ end
92
+
93
+ Then /^remote folder "(.*)" is created/ do |folder|
89
94
  FileUtils.chdir @remote_folder do
90
95
  File.exists?(folder).should be_true
91
96
  end
92
97
  end
93
98
 
94
- Then %r{^remote file '(.*)' (is|is not) created} do |file, is|
99
+ Then /^remote file "(.*)" (is|is not) created/ do |file, is|
95
100
  FileUtils.chdir @remote_folder do
96
101
  File.exists?(file).should(is == 'is' ? be_true : be_false)
97
102
  end
@@ -1,51 +1,27 @@
1
- def in_project_folder(&block)
2
- project_folder = @active_project_folder || @tmp_root
3
- FileUtils.chdir(project_folder, &block)
4
- end
5
-
6
- def in_home_folder(&block)
7
- FileUtils.chdir(@home_path, &block)
8
- end
9
-
10
- Given %r{^a safe folder} do
1
+ Given /^a safe folder/ do
11
2
  FileUtils.rm_rf @tmp_root = File.dirname(__FILE__) + "/../../tmp"
12
3
  FileUtils.mkdir_p @tmp_root
13
4
  FileUtils.mkdir_p @home_path = File.expand_path(File.join(@tmp_root, "home"))
14
5
  @lib_path = File.expand_path(File.dirname(__FILE__) + '/../../lib')
15
- Given "env variable $HOME set to '#{@home_path}'"
6
+ Given %Q{env variable $HOME set to "#{@home_path}"}
16
7
  end
17
8
 
18
- Given %r{^this project is active project folder} do
9
+ Given /^this project is active project folder/ do
19
10
  Given "a safe folder"
20
11
  @active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..")
21
12
  end
22
13
 
23
- Given %r{^env variable \$([\w_]+) set to '(.*)'} do |env_var, value|
14
+ Given /^env variable \$([\w_]+) set to "(.*)"/ do |env_var, value|
24
15
  ENV[env_var] = value
25
16
  end
26
17
 
27
- def force_local_lib_override(project_name = @project_name)
28
- rakefile = File.read(File.join(project_name, 'Rakefile'))
29
- File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
30
- f << "$:.unshift('#{@lib_path}')\n"
31
- f << rakefile
32
- end
33
- end
34
-
35
- def setup_active_project_folder project_name
36
- @active_project_folder = File.join(@tmp_root, project_name)
37
- @project_name = project_name
38
- end
39
-
40
- Given %r{'(.*)' folder is deleted} do |folder|
41
- in_project_folder do
42
- FileUtils.rm_rf folder
43
- end
18
+ Given /"(.*)" folder is deleted/ do |folder|
19
+ in_project_folder { FileUtils.rm_rf folder }
44
20
  end
45
21
 
46
- When %r{^'(.*)' generator is invoked with arguments '(.*)'$} do |generator, arguments|
22
+ When /^I invoke "(.*)" generator with arguments "(.*)"$/ do |generator, arguments|
47
23
  @stdout = StringIO.new
48
- FileUtils.chdir(@active_project_folder) do
24
+ in_project_folder do
49
25
  if Object.const_defined?("APP_ROOT")
50
26
  APP_ROOT.replace(FileUtils.pwd)
51
27
  else
@@ -59,21 +35,21 @@ When %r{^'(.*)' generator is invoked with arguments '(.*)'$} do |generator, argu
59
35
  end
60
36
  end
61
37
 
62
- When %r{run executable '(.*)' with arguments '(.*)'} do |executable, arguments|
38
+ When /^I run executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
63
39
  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
64
40
  in_project_folder do
65
41
  system "#{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
66
42
  end
67
43
  end
68
44
 
69
- When %r{run project executable '(.*)' with arguments '(.*)'} do |executable, arguments|
45
+ When /^I run project executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
70
46
  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
71
47
  in_project_folder do
72
48
  system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
73
49
  end
74
50
  end
75
51
 
76
- When %r{run local executable '(.*)' with arguments '(.*)'} do |executable, arguments|
52
+ When /^I run local executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
77
53
  @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
78
54
  executable = File.expand_path(File.join(File.dirname(__FILE__), "/../../bin", executable))
79
55
  in_project_folder do
@@ -81,32 +57,41 @@ When %r{run local executable '(.*)' with arguments '(.*)'} do |executable, argum
81
57
  end
82
58
  end
83
59
 
84
- When %r{^task 'rake (.*)' is invoked$} do |task|
60
+ When /^I invoke task "rake (.*)"/ do |task|
85
61
  @stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
86
- FileUtils.chdir(@active_project_folder) do
62
+ in_project_folder do
87
63
  system "rake #{task} --trace > #{@stdout} 2> #{@stdout}"
88
64
  end
89
65
  end
90
66
 
91
- Then %r{^folder '(.*)' (is|is not) created} do |folder, is|
67
+ Then /^folder "(.*)" (is|is not) created/ do |folder, is|
92
68
  in_project_folder do
93
69
  File.exists?(folder).should(is == 'is' ? be_true : be_false)
94
70
  end
95
71
  end
96
72
 
97
- Then %r{^file '(.*)' (is|is not) created} do |file, is|
73
+ Then /^file "(.*)" (is|is not) created/ do |file, is|
98
74
  in_project_folder do
99
75
  File.exists?(file).should(is == 'is' ? be_true : be_false)
100
76
  end
101
77
  end
102
78
 
103
- Then %r{^file with name matching '(.*)' is created} do |pattern|
79
+ Then /^file with name matching "(.*)" is created/ do |pattern|
104
80
  in_project_folder do
105
81
  Dir[pattern].should_not be_empty
106
82
  end
107
83
  end
108
84
 
109
- Then %r{gem file '(.*)' and generated file '(.*)' should be the same} do |gem_file, project_file|
85
+ Then /^file "(.*)" contents (does|does not) match \/(.*)\// do |file, does, regex|
86
+ in_project_folder do
87
+ actual_output = File.read(file)
88
+ (does == 'does') ?
89
+ actual_output.should(match(/#{regex}/)) :
90
+ actual_output.should_not(match(/#{regex}/))
91
+ end
92
+ end
93
+
94
+ Then /gem file "(.*)" and generated file "(.*)" should be the same/ do |gem_file, project_file|
110
95
  File.exists?(gem_file).should be_true
111
96
  File.exists?(project_file).should be_true
112
97
  gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
@@ -114,77 +99,70 @@ Then %r{gem file '(.*)' and generated file '(.*)' should be the same} do |gem_fi
114
99
  project_file_contents.should == gem_file_contents
115
100
  end
116
101
 
117
- Then %r{^output same as contents of '(.*)'$} do |file|
118
- expected_output = File.read(File.join(File.dirname(__FILE__) + "/../expected_outputs", file))
119
- actual_output = File.read(@stdout)
120
- actual_output.should == expected_output
121
- end
122
-
123
- Then %r{^(does|does not) invoke generator '(.*)'$} do |does_invoke, generator|
102
+ Then /^(does|does not) invoke generator "(.*)"$/ do |does_invoke, generator|
124
103
  actual_output = File.read(@stdout)
125
104
  does_invoke == "does" ?
126
105
  actual_output.should(match(/dependency\s+#{generator}/)) :
127
106
  actual_output.should_not(match(/dependency\s+#{generator}/))
128
107
  end
129
108
 
130
- Then %r{help options '(.*)' and '(.*)' are displayed} do |opt1, opt2|
109
+ Then /help options "(.*)" and "(.*)" are displayed/ do |opt1, opt2|
131
110
  actual_output = File.read(@stdout)
132
111
  actual_output.should match(/#{opt1}/)
133
112
  actual_output.should match(/#{opt2}/)
134
113
  end
135
114
 
136
- Then %r{^output (does|does not) match \/(.*)\/} do |does, regex|
115
+ Then /^I should see$/ do |text|
137
116
  actual_output = File.read(@stdout)
138
- (does == 'does') ?
139
- actual_output.should(match(/#{regex}/)) :
140
- actual_output.should_not(match(/#{regex}/))
117
+ actual_output.should contain(text)
141
118
  end
142
119
 
143
- Then %r{^contents of file '(.*)' (does|does not) match \/(.*)\/} do |file, does, regex|
144
- in_project_folder do
145
- actual_output = File.read(file)
146
- (does == 'does') ?
147
- actual_output.should(match(/#{regex}/)) :
148
- actual_output.should_not(match(/#{regex}/))
149
- end
120
+ Then /^I should not see$/ do |text|
121
+ actual_output = File.read(@stdout)
122
+ actual_output.should_not contain(text)
150
123
  end
151
124
 
152
- Then %r{^all (\d+) tests pass} do |expected_test_count|
125
+ Then /^I should see exactly$/ do |text|
126
+ actual_output = File.read(@stdout)
127
+ actual_output.should == text
128
+ end
129
+
130
+ Then /^I should see all (\d+) tests pass/ do |expected_test_count|
153
131
  expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
154
132
  actual_output = File.read(@stdout)
155
133
  actual_output.should match(expected)
156
134
  end
157
135
 
158
- Then %r{^all (\d+) examples pass} do |expected_test_count|
136
+ Then /^I should see all (\d+) examples pass/ do |expected_test_count|
159
137
  expected = %r{^#{expected_test_count} examples?, 0 failures}
160
138
  actual_output = File.read(@stdout)
161
139
  actual_output.should match(expected)
162
140
  end
163
141
 
164
- Then %r{^yaml file '(.*)' contains (\{.*\})} do |file, yaml|
142
+ Then /^yaml file "(.*)" contains (\{.*\})/ do |file, yaml|
165
143
  in_project_folder do
166
144
  yaml = eval yaml
167
145
  YAML.load(File.read(file)).should == yaml
168
146
  end
169
147
  end
170
148
 
171
- Then %r{^Rakefile can display tasks successfully} do
149
+ Then /^Rakefile can display tasks successfully/ do
172
150
  @stdout = File.expand_path(File.join(@tmp_root, "rakefile.out"))
173
- FileUtils.chdir(@active_project_folder) do
151
+ in_project_folder do
174
152
  system "rake -T > #{@stdout} 2> #{@stdout}"
175
153
  end
176
154
  actual_output = File.read(@stdout)
177
155
  actual_output.should match(/^rake\s+\w+\s+#\s.*/)
178
156
  end
179
157
 
180
- Then %r{^task 'rake (.*)' is executed successfully} do |task|
158
+ Then /^task "rake (.*)" is executed successfully/ do |task|
181
159
  @stdout.should_not be_nil
182
160
  actual_output = File.read(@stdout)
183
161
  actual_output.should_not match(/^Don't know how to build task '#{task}'/)
184
162
  actual_output.should_not match(/Error/i)
185
163
  end
186
164
 
187
- Then %r{^gem spec key '(.*)' contains \/(.*)\/} do |key, regex|
165
+ Then /^gem spec key "(.*)" contains \/(.*)\// do |key, regex|
188
166
  in_project_folder do
189
167
  gem_file = Dir["pkg/*.gem"].first
190
168
  gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
@@ -1,6 +1,6 @@
1
1
  Then /^gemspec builds the RubyGem successfully$/ do
2
2
  @stdout = File.expand_path(File.join(@tmp_root, "rake.out"))
3
- FileUtils.chdir(@active_project_folder) do
3
+ in_project_folder do
4
4
  system "gem build #{@project_name}.gemspec > #{@stdout}"
5
5
  gemspec = Dir['**/*.gem'].first
6
6
  gemspec.should_not be_nil
@@ -0,0 +1,8 @@
1
+ module CliHelpers
2
+ def newgem_cmd
3
+ File.expand_path(File.dirname(__FILE__) + "/../../bin/newgem")
4
+ end
5
+ end
6
+
7
+ World(CliHelpers)
8
+
@@ -0,0 +1,29 @@
1
+ module CommonHelpers
2
+ def in_tmp_folder(&block)
3
+ FileUtils.chdir(@tmp_root, &block)
4
+ end
5
+
6
+ def in_project_folder(&block)
7
+ project_folder = @active_project_folder || @tmp_root
8
+ FileUtils.chdir(project_folder, &block)
9
+ end
10
+
11
+ def in_home_folder(&block)
12
+ FileUtils.chdir(@home_path, &block)
13
+ end
14
+
15
+ def force_local_lib_override(project_name = @project_name)
16
+ rakefile = File.read(File.join(project_name, 'Rakefile'))
17
+ File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
18
+ f << "$:.unshift('#{@lib_path}')\n"
19
+ f << rakefile
20
+ end
21
+ end
22
+
23
+ def setup_active_project_folder project_name
24
+ @active_project_folder = File.join(@tmp_root, project_name)
25
+ @project_name = project_name
26
+ end
27
+ end
28
+
29
+ World(CommonHelpers)
@@ -5,7 +5,7 @@ require 'spec'
5
5
 
6
6
  require 'pp'
7
7
  require 'fileutils'
8
- require 'rubygems'
8
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
9
9
 
10
10
  # Following lines from original Rails cucumber generator.
11
11
  # Not sure how to translate/reuse etc yet.
@@ -22,12 +22,7 @@ require 'rubygems'
22
22
  # code from test/test_generator_helper.rb
23
23
  TMP_ROOT = File.dirname(__FILE__) + "/tmp" unless defined?(TMP_ROOT)
24
24
 
25
- begin
26
- require 'rubigen'
27
- rescue LoadError
28
- require 'rubygems'
29
- require 'rubigen'
30
- end
25
+ require 'rubigen'
31
26
  require 'rubigen/helpers/generator_test_helper'
32
27
  include RubiGen::GeneratorTestHelper
33
28