lib/counterfeit.rb in counterfeit-0.0.2 vs lib/counterfeit.rb in counterfeit-0.0.3
- old
+ new
@@ -3,9 +3,10 @@
require 'counterfeit/version'
require 'counterfeit/schema'
require 'counterfeit/active_record'
require 'counterfeit/money'
-
-ActiveRecord::Base.send :include, Counterfeit::ActiveRecord
-ActiveRecord::ConnectionAdapters::Table.send :include, Counterfeit::Schema
-ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Counterfeit::Schema
+if defined? ActiveRecord
+ ActiveRecord::Base.send :include, Counterfeit::ActiveRecord
+ ActiveRecord::ConnectionAdapters::Table.send :include, Counterfeit::Schema
+ ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Counterfeit::Schema
+end
\ No newline at end of file