diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-15 09:34:14 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-15 09:34:14 +0000 |
commit | 2b0d668efcb09136f45522177e1d9d2db3fdac9b (patch) | |
tree | fd22d2bfc6449fd5d5b71f2dfe9f78e05d6ea7dc | |
parent | 760f6ae3f4930e95ea5fd5dd85c8d92ac29ba785 (diff) | |
download | rails-2b0d668efcb09136f45522177e1d9d2db3fdac9b.tar.gz rails-2b0d668efcb09136f45522177e1d9d2db3fdac9b.tar.bz2 rails-2b0d668efcb09136f45522177e1d9d2db3fdac9b.zip |
Dont run FCGIDispatcher tests if mocha is not available
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/test/abstract_unit.rb | 2 | ||||
-rw-r--r-- | railties/test/dispatcher_test.rb | 2 | ||||
-rw-r--r-- | railties/test/fcgi_dispatcher_test.rb | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index eac36d41b3..07aeb77fdf 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -5,8 +5,6 @@ $:.unshift File.dirname(__FILE__) + "/../builtin/rails_info" require 'test/unit' require 'rubygems' -require 'mocha' -require 'stubba' # Needed for the class mock delegation #require File.dirname(__FILE__) + "/../../activesupport/lib/active_support/core_ext/class/attribute_accessors" diff --git a/railties/test/dispatcher_test.rb b/railties/test/dispatcher_test.rb index 360a3e8023..31d1634cc0 100644 --- a/railties/test/dispatcher_test.rb +++ b/railties/test/dispatcher_test.rb @@ -138,4 +138,4 @@ class DispatcherTest < Test::Unit::TestCase def assert_subclasses(howmany, klass, message = klass.subclasses.inspect) assert_equal howmany, klass.subclasses.size, message end -end +end
\ No newline at end of file diff --git a/railties/test/fcgi_dispatcher_test.rb b/railties/test/fcgi_dispatcher_test.rb index 303a4fcaeb..7e9adbe9d3 100644 --- a/railties/test/fcgi_dispatcher_test.rb +++ b/railties/test/fcgi_dispatcher_test.rb @@ -1,5 +1,10 @@ require File.dirname(__FILE__) + "/abstract_unit" +begin # rescue LoadError + +require 'mocha' +require 'stubba' + $:.unshift File.dirname(__FILE__) + "/mocks" require 'stringio' @@ -283,3 +288,7 @@ class RailsFCGIHandlerPeriodicGCTest < Test::Unit::TestCase assert_nil @handler.when_ready end end + +rescue LoadError + $stderr.puts "Skipping dispatcher tests. `gem install mocha` and try again." +end
\ No newline at end of file |