Sha256: fe274dd9691befd493e0f49fdc952a6c963ec490ccc424794fcc4d8993d3f6cc
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'rubygems' require 'active_record' require 'test/unit' require File.dirname(__FILE__) + '/../lib/has_setting' ActiveRecord::Base.establish_connection( :adapter => 'sqlite3', :database => 'test.sqlite3', :timeout => 5000 ) ActiveRecord::Base.connection.drop_table(:settings) rescue ActiveRecord::StatementInvalid [:foos, :bars, :bazs].each do |table| ActiveRecord::Base.connection.drop_table(table) rescue ActiveRecord::StatementInvalid end ActiveRecord::Base.connection.create_table(:settings) do |table| table.string(:value, :limit => 255) table.string(:name, :limit => 64, :null => false) table.string(:owner_type, :limit => 255, :null => false) table.integer(:owner_id, :null => false) table.string(:locale) end [:foos, :bars, :bazs].each do |table| ActiveRecord::Base.connection.create_table(table) do |t| end end require File.join(File.dirname(__FILE__), 'foo') require File.join(File.dirname(__FILE__), 'bar') require File.join(File.dirname(__FILE__), 'baz')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
has_setting-0.5 | test/test_helper.rb |