Permalink
Browse files

explicitly requiring should/test_unit since the existance of Spec cla…

…ss makes shoulda think we're using RSpec
  • Loading branch information...
1 parent 70938c0 commit 00613dd5b6896ba14d5c38c57e36bd7116a7b4e5 @drnic committed Sep 26, 2009
Showing with 7 additions and 27 deletions.
  1. +3 −1 Rakefile
  2. +0 −1 test/test_generator_helper.rb
  3. +4 −25 test/test_helper.rb
View
@@ -1,9 +1,11 @@
+require "rubygems"
require "hoe"
require './lib/rubigen'
Hoe.plugin :newgem
Hoe.plugin :website
Hoe.plugin :cucumberfeatures
+Hoe.plugin :git
# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
@@ -13,7 +15,7 @@ Hoe.spec 'rubigen' do
extra_deps << ['activesupport','>= 2.2.2']
extra_deps << ['mocha','>= 0.9.7']
extra_deps << ['cucumber','>= 0.3.6']
- # extra_deps << ['thoughtbot-shoulda','>= 2.10.2']
+ extra_deps << ['thoughtbot-shoulda','>= 2.10.2']
end
require 'newgem/tasks' rescue nil # load /tasks/*.rake
@@ -1,6 +1,5 @@
require File.dirname(__FILE__) + '/test_helper'
require 'fileutils'
-require 'shoulda'
# Must set before requiring generator libs.
TMP_ROOT = File.expand_path(File.dirname(__FILE__) + "/../tmp") unless defined?(TMP_ROOT)
View
@@ -2,28 +2,7 @@
require File.dirname(__FILE__) + '/../lib/rubigen'
require 'rubigen/helpers/generator_test_helper'
include RubiGen
-
-def load_mocha
- require 'rubygems'
- begin
- gem 'mocha'
- rescue LoadError
- puts <<-EOS
-#{$!}
-
-This RubyGem is required to run the tests.
-
-Install: gem install mocha
-EOS
- end
- require 'mocha'
-end
-begin
- gem 'mocha'
-rescue LoadError
- load_mocha
-rescue NoMethodError
- load_mocha
-end
-
-require "shoulda"
+require 'rubygems'
+require "shoulda"
+require "shoulda/test_unit"
+require 'mocha'

0 comments on commit 00613dd

Please sign in to comment.