Sha256: e02953f50ebc2ae3c43842232c32fc945a1d909bee152a39d7d676f7c385d530
Contents?: true
Size: 875 Bytes
Versions: 5
Compression:
Stored size: 875 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 fields \ :title, :terms, :age has_many :addresses has_one :name end class Address < Mongoid::Document fields \ :street, :city, :state, :post_code belongs_to :person end class Name < Mongoid::Document fields \ :first_name, :last_name belongs_to :person end class Tester < Mongoid::Document has_timestamps end class Decorated include Mongoid::Associations::Decorator def initialize(doc) @document = doc end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mongoid-0.4.2 | spec/spec_helper.rb |
mongoid-0.4.1 | spec/spec_helper.rb |
mongoid-0.3.2 | spec/spec_helper.rb |
mongoid-0.3.1 | spec/spec_helper.rb |
mongoid-0.3.0 | spec/spec_helper.rb |