Sha256: 89921781ae9a5ffdecea04936cfab192dbc743851bc0e8eb89c53d291a3851c9

Contents?: true

Size: 1.06 KB

Versions: 32

Compression:

Stored size: 1.06 KB

Contents

if ADAPTER=='mongoid'
  require 'mongoid'
  Mongoid.configure do |config|
    name = "lolita3_test"
    host = "localhost"
    config.master = Mongo::Connection.new.db(name)
    config.slaves = [
      Mongo::Connection.new(host, 27017, :slave_ok => true).db(name)
    ]
    #config.use_object_ids = true
    config.persist_in_safe_mode = false
  end
else
  require 'active_record'
  ActiveRecord::Base.establish_connection({ :database => ":memory:", :adapter => 'sqlite3', :timeout => 500 })
  ActiveRecord::Schema.define do
    create_table :posts, :force => true do |t|
      t.string :field_one
    end
    create_table :test_class2, :force => true do |t|
      t.string :field_one
    end
    create_table :pages,:force=>true do |t|
      t.string :name
    end
  end
  
  class Comment < ActiveRecord::Base
    belongs_to :test_class1, :class_name=>"Post"
  end

  class Post < ActiveRecord::Base
    has_many :pages
    include Lolita::Configuration
    lolita 
  end

  class Profile < ActiveRecord::Base
    include Lolita::Configuration
    lolita do
      
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
lolita-3.2.0.rc.17 spec/adapter_helper.rb
lolita-3.2.0.rc.16 spec/adapter_helper.rb
lolita-3.2.0.rc.14 spec/adapter_helper.rb
lolita-3.2.0.rc.13 spec/adapter_helper.rb
lolita-3.2.0.rc.12 spec/adapter_helper.rb
lolita-3.2.0.rc.11 spec/adapter_helper.rb
lolita-3.2.0.rc.10 spec/adapter_helper.rb
lolita-3.2.0.rc.9 spec/adapter_helper.rb
lolita-3.2.0.rc.7 spec/adapter_helper.rb
lolita-3.1.18 spec/adapter_helper.rb
lolita-3.2.0.rc.6 spec/adapter_helper.rb
lolita-3.2.0.rc.5 spec/adapter_helper.rb
lolita-3.2.0.rc.4 spec/adapter_helper.rb
lolita-3.2.0.rc.3 spec/adapter_helper.rb
lolita-3.2.0.rc2 spec/adapter_helper.rb
lolita-3.2.0.rc1 spec/adapter_helper.rb
lolita-3.1.17 spec/adapter_helper.rb
lolita-3.1.16 spec/adapter_helper.rb
lolita-3.1.15 spec/adapter_helper.rb
lolita-3.1.14 spec/adapter_helper.rb