Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.508 kB
require 'test_helper'
require 'active_record'
def open_test_db_connect
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'test/test.sqlite3'
)
end
open_test_db_connect
def close_test_db_connect
ActiveRecord::Base.connection.disconnect!
end
class Test::Unit::TestCase
def no_connection
close_test_db_connect
assert_nothing_raised { yield }
ensure
open_test_db_connect
end
end
require 'active_record/model/user'
require 'active_record/model/book'
Jump to Line
Something went wrong with that request. Please try again.