Sha256: 69fe1cf8de881275a6baf9a3c92cf676ee228db3d4dec402f5e9a0a34090f95b
Contents?: true
Size: 623 Bytes
Versions: 3
Compression:
Stored size: 623 Bytes
Contents
test_db_root = File.expand_path('../../../tmp/', __FILE__) Dir.mkdir test_db_root unless Dir.exists? test_db_root SQLite3::Database.new "#{test_db_root}/test.db" ActiveRecord::Base.establish_connection( :adapter => 'sqlite3', :database => 'tmp/test.db' ) ActiveRecord::Base.connection.create_table(:model_with_time_zones) do |t| t.datetime :started_at_utc t.datetime :ended_at_utc t.string :time_zone end RSpec.configure do |config| config.before(:each) do ActiveRecord::Base.connection.execute 'DELETE FROM model_with_time_zones' end config.after(:suite) do `rm -f ./tmp/test.db` end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
greenwich-2.0.4 | spec/support/active_record.rb |
greenwich-2.0.3 | spec/support/active_record.rb |
greenwich-2.0.2 | spec/support/active_record.rb |