spec/spec_helper.rb in i18n_column-0.0.2 vs spec/spec_helper.rb in i18n_column-0.0.3

- old
+ new

@@ -1,23 +1,11 @@ -$LOAD_PATH.unshift(File.dirname(__FILE__)) -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -require 'rubygems' -require 'active_record' -require 'i18n_column' +require('i18n_column') ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:') -def setup_db - ActiveRecord::Schema.define(:version => 1) do - create_table(:nodes) do |t| - t.text(:name) - end - end -end - -def teardown_db - ActiveRecord::Base.connection.tables.each do |table| - ActiveRecord::Base.connection.drop_table(table) +ActiveRecord::Schema.define(:version => 1) do + create_table(:nodes) do |t| + t.string(:name) end end class Node < ActiveRecord::Base i18n_column(:name)