Sha256: a0b8753c7a5d12082fe5db3d0f4e2569ba9fd28ac15038cfb9d3316a9b0ec7ae
Contents?: true
Size: 927 Bytes
Versions: 1
Compression:
Stored size: 927 Bytes
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require 'rubygems' gem "mocha", "0.9.8" require "mocha" require "mongoid" require "spec" Mongoid.connect_to("mongoid_test") Spec::Runner.configure do |config| config.mock_with :mocha Mocha::Configuration.prevent(:stubbing_non_existent_method) end class Person < Mongoid::Document include Mongoid::Timestamps field :title field :terms, :type => Boolean field :age, :type => Integer has_many :addresses has_one :name end class Address < Mongoid::Document field :street field :city field :state field :post_code key :street belongs_to :person end class Name < Mongoid::Document field :first_name field :last_name key :first_name, :last_name belongs_to :person end class Decorated include Mongoid::Associations::Decorator def initialize(doc) @document = doc end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-0.5.4 | spec/spec_helper.rb |