mongoid 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.8
1
+ 0.6.9
@@ -1,8 +1,6 @@
1
1
  module Mongoid #:nodoc:
2
2
  module Associations #:nodoc:
3
3
  module Decorator #:nodoc:
4
- EXTRAS = [:save, :save!, :==]
5
-
6
4
  def self.included(base)
7
5
  base.class_eval do
8
6
  attr_reader :document
@@ -12,7 +10,7 @@ module Mongoid #:nodoc:
12
10
  # since we can ask the class for its methods and get an
13
11
  # accurate list.
14
12
  def decorate!
15
- meths = document.public_methods(false) + EXTRAS
13
+ meths = document.public_methods
16
14
  meths.each do |method|
17
15
  (class << self; self; end).class_eval do
18
16
  define_method method do |*args|
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoid}
8
- s.version = "0.6.8"
8
+ s.version = "0.6.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Durran Jordan"]
@@ -24,7 +24,7 @@ describe Mongoid::Associations::Accessor do
24
24
 
25
25
  it "returns a HasOne" do
26
26
  association = Mongoid::Associations::Accessor.get(Mongoid::Associations::HasOne, :name, @document)
27
- association.should be_a_kind_of(Mongoid::Associations::HasOne)
27
+ association.should be_a_kind_of(Name)
28
28
  end
29
29
 
30
30
  end
@@ -43,8 +43,8 @@ describe Mongoid::Associations::Accessor do
43
43
  context "when type is belongs_to" do
44
44
 
45
45
  it "returns a BelongsTo" do
46
- association = Mongoid::Associations::Accessor.get(Mongoid::Associations::BelongsTo, :person, @document)
47
- association.should be_a_kind_of(Mongoid::Associations::BelongsTo)
46
+ association = Mongoid::Associations::Accessor.get(Mongoid::Associations::BelongsTo, :person, stub(:parent => @document))
47
+ association.should be_a_kind_of(Person)
48
48
  end
49
49
 
50
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan