aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/test/abstract_unit.rb')
-rw-r--r--activeresource/test/abstract_unit.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/activeresource/test/abstract_unit.rb b/activeresource/test/abstract_unit.rb
index e612412033..667a7b2a37 100644
--- a/activeresource/test/abstract_unit.rb
+++ b/activeresource/test/abstract_unit.rb
@@ -1,5 +1,8 @@
require 'test/unit'
+gem 'mocha', '>= 0.9.5'
+require 'mocha'
+
$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_resource'
require 'active_resource/http_mock'
@@ -17,10 +20,3 @@ def uses_gem(gem_name, test_name, version = '> 0')
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
-end