From 278186534c0ccf285a20497461f40d2e54aa20a0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 3 Feb 2009 18:25:37 -0800 Subject: Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. --- actionmailer/test/abstract_unit.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'actionmailer/test/abstract_unit.rb') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index a6126d6f7f..c8e9fc789a 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,5 +1,8 @@ require 'test/unit' +gem 'mocha', '>= 0.9.5' +require 'mocha' + $:.unshift "#{File.dirname(__FILE__)}/../lib" $:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib" @@ -51,13 +54,6 @@ 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 - def set_delivery_method(delivery_method) @old_delivery_method = ActionMailer::Base.delivery_method ActionMailer::Base.delivery_method = delivery_method -- cgit v1.2.3 From b302e023b786aaa246a467ec4f4c619353cbdbb2 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 3 Feb 2009 18:57:01 -0800 Subject: Require rubygems --- actionmailer/test/abstract_unit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/test/abstract_unit.rb') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index c8e9fc789a..51b375fef3 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'test/unit' gem 'mocha', '>= 0.9.5' @@ -46,7 +47,6 @@ class Net::SMTP end def uses_gem(gem_name, test_name, version = '> 0') - require 'rubygems' gem gem_name.to_s, version require gem_name.to_s yield -- cgit v1.2.3