Permalink
Browse files

Actually rescue a LoadError when the AR mysql adapters are not availa…

…ble.
  • Loading branch information...
1 parent 016d66c commit 910847553a5604d9d0b87aa177554ea6f159c507 Garrow Bedrossian committed Sep 3, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/database_cleaner/active_record/truncation.rb
@@ -2,7 +2,10 @@
require 'active_record/connection_adapters/abstract_adapter'
-require 'active_record/connection_adapters/abstract_mysql_adapter' rescue LoadError
+begin
+ require 'active_record/connection_adapters/abstract_mysql_adapter'
+rescue LoadError
+end
require "database_cleaner/generic/truncation"
require 'database_cleaner/active_record/base'

0 comments on commit 9108475

Please sign in to comment.