aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-19 11:08:19 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-19 11:08:19 -0800
commita1ce4008c82f8aabcabaad1e424487f56d6ce2a3 (patch)
tree2178da3f38e90fc1941e429a6139d7015166186d /activemodel
parentbedea330432444ffcc003b54ae12c5ecc4e4b3eb (diff)
downloadrails-a1ce4008c82f8aabcabaad1e424487f56d6ce2a3.tar.gz
rails-a1ce4008c82f8aabcabaad1e424487f56d6ce2a3.tar.bz2
rails-a1ce4008c82f8aabcabaad1e424487f56d6ce2a3.zip
Require mocha before the testcase overrides, otherwise its run method is clobbered
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/test_helper.rb24
1 files changed, 6 insertions, 18 deletions
diff --git a/activemodel/test/test_helper.rb b/activemodel/test/test_helper.rb
index 6c10925270..78f1c364e3 100644
--- a/activemodel/test/test_helper.rb
+++ b/activemodel/test/test_helper.rb
@@ -1,30 +1,18 @@
+require 'rubygems'
require 'test/unit'
+
+gem 'mocha', '>= 0.5.5'
+require 'mocha'
+
require 'active_model'
require 'active_model/state_machine'
require 'active_support/test_case'
-def uses_gem(gem_name, test_name, version = '> 0')
- require 'rubygems'
- gem gem_name.to_s, version
- require gem_name.to_s
- yield
-rescue LoadError
- $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again."
-end
-
-# Wrap tests that use Mocha and skip if unavailable.
-unless defined? uses_mocha
- def uses_mocha(test_name, &block)
- uses_gem('mocha', test_name, '>= 0.5.5', &block)
- end
+class ActiveModel::TestCase < ActiveSupport::TestCase
end
begin
- require 'rubygems'
require 'ruby-debug'
Debugger.start
rescue LoadError
end
-
-class ActiveModel::TestCase < ActiveSupport::TestCase
-end