Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #145 from garrow/rescue_loaderror_fix

Actually rescue a LoadError when the AR mysql adapters are not available.
  • Loading branch information...
commit dfb3f508e5d3814256a09cfeb167baed689338a0 2 parents 016d66c + 9108475
Ben Mabey bmabey authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/database_cleaner/active_record/truncation.rb
5 lib/database_cleaner/active_record/truncation.rb
View
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.