diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-07 09:15:26 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-07 09:15:26 +0000 |
commit | 845e6ff45a704d1cb0495a31c05f5cb190252a43 (patch) | |
tree | ea6aa68ccb5f2e93e2c95986300c5b043d4ec960 /activesupport/test | |
parent | 4430a00c048c195d6fbfb3eacb2bb195f709ac1a (diff) | |
download | rails-845e6ff45a704d1cb0495a31c05f5cb190252a43.tar.gz rails-845e6ff45a704d1cb0495a31c05f5cb190252a43.tar.bz2 rails-845e6ff45a704d1cb0495a31c05f5cb190252a43.zip |
String#to_xs uses the fast_xs extension if available for Builder speedup.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index da157a81c8..2cfa245bc8 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -5,13 +5,15 @@ $:.unshift File.dirname(__FILE__) require 'active_support' # Wrap tests that use Mocha and skip if unavailable. -def uses_mocha(test_name) - require 'rubygems' - gem 'mocha', '>= 0.5.5' - require 'mocha' - yield -rescue LoadError - $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again." +unless defined? uses_mocha + def uses_mocha(test_name) + require 'rubygems' + gem 'mocha', '>= 0.5.5' + require 'mocha' + yield + rescue LoadError + $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again." + end end # Show backtraces for deprecated behavior for quicker cleanup. |