Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b4c289ac55
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (20 sloc) 0.683 kB
module UnitRecord
module DisconnectedActiveRecord
def disconnected?
connected? && connection.is_a?(ActiveRecord::ConnectionAdapters::UnitRecordAdapter)
end
def disconnect!(options = {})
return if disconnected?
establish_connection options.merge(:adapter => "unit_record")
if options[:stub_associations]
ActiveRecord::Base.send :include, UnitRecord::AssociationStubbing
end
Fixtures.disconnect!
UnitRecord.base_rails_test_class.disconnect!
ActiveRecord::Migration.verbose = false
ActiveRecord::Base.connection.change_strategy(:noop) do
load(RAILS_ROOT + "/db/schema.rb")
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.