diff options
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/test_helper.rb | 24 |
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 |