Sha256: 238c860369fab54e1a2b388dcbedd3d841380d9a26f46cf7dc450c3ec32b5eb4
Contents?: true
Size: 1.3 KB
Versions: 4
Compression:
Stored size: 1.3 KB
Contents
$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') $:.unshift File.expand_path(File.dirname(__FILE__)) require 'rubygems' require 'active_support' require 'active_record' require 'multilang-hstore' require 'logger' ActiveRecord::Base.logger = Logger.new(nil) ActiveRecord::Base.establish_connection(:adapter => "postgresql", :database => "multilang-hstore-test", :host=>'127.0.0.1', :user=>'postgres') I18n.available_locales = [:lv, :ru] I18n.locale = I18n.default_locale = :lv def setup_db ActiveRecord::Migration.verbose = false load "schema.rb" end def teardown_db ActiveRecord::Base.connection.tables.each do |table| ActiveRecord::Base.connection.drop_table(table) end end #testable models class AbstractPost < ActiveRecord::Base end class MinimalPost < ActiveRecord::Base self.table_name = 'abstract_posts' multilang :title, :required => false multilang :body, :required => false end class RegularPost < ActiveRecord::Base self.table_name = 'abstract_posts' multilang :title, :required => true, :length => 25 multilang :body, :required => true, :length => 1000 end class PartialPost < ActiveRecord::Base self.table_name = 'abstract_posts' multilang :title multilang :body end class NamedPost < ActiveRecord::Base self.table_name = 'named_posts' multilang :title end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
multilang-hstore-1.0.1 | spec/spec_helper.rb |
multilang-hstore-1.0.0 | spec/spec_helper.rb |
multilang-hstore-1.0.0.rc2 | spec/spec_helper.rb |
multilang-hstore-1.0.0.rc1 | spec/spec_helper.rb |