diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-03-31 12:25:04 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-03-31 12:25:04 -0700 |
commit | 6eff04499e28865890e1ae3915fe80e4903a997b (patch) | |
tree | cd4f7cd98519a3bdc7ec5665f0aec7133e0dba10 /activesupport/lib/active_support/testing/mochaing.rb | |
parent | edf7c9a6a3331bfc0beabc9dc9c8beac22677e53 (diff) | |
download | rails-6eff04499e28865890e1ae3915fe80e4903a997b.tar.gz rails-6eff04499e28865890e1ae3915fe80e4903a997b.tar.bz2 rails-6eff04499e28865890e1ae3915fe80e4903a997b.zip |
Add using Turn with natural language test case names if the library is available (which it will be in Rails 3.1) [DHH]
Diffstat (limited to 'activesupport/lib/active_support/testing/mochaing.rb')
-rw-r--r-- | activesupport/lib/active_support/testing/mochaing.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/mochaing.rb b/activesupport/lib/active_support/testing/mochaing.rb new file mode 100644 index 0000000000..4ad75a6681 --- /dev/null +++ b/activesupport/lib/active_support/testing/mochaing.rb @@ -0,0 +1,7 @@ +begin + silence_warnings { require 'mocha' } +rescue LoadError + # Fake Mocha::ExpectationError so we can rescue it in #run. Bleh. + Object.const_set :Mocha, Module.new + Mocha.const_set :ExpectationError, Class.new(StandardError) +end
\ No newline at end of file |