mongoid-publishable 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ **.DS_Store
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -47,7 +47,7 @@ module Mongoid
47
47
  end
48
48
 
49
49
  def serialize_object_for_session
50
- source_object.finder_json
50
+ Mongoid::NestedSerialization::Serializer.new(source_object).to_json
51
51
  end
52
52
  end
53
53
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Publishable
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -92,8 +92,16 @@ describe Mongoid::Publishable::UnpublishedObject do
92
92
  Mongoid::Publishable::UnpublishedObject.new(model: model)
93
93
  end
94
94
 
95
- it "should delegate to the model" do
96
- expect(subject.id).to eq model.id
95
+ context "with an existing model method" do
96
+ it "should delegate to the model" do
97
+ expect(subject.id).to eq model.id
98
+ end
99
+ end
100
+
101
+ context "with a non-existent model method" do
102
+ it "should raise the typical error" do
103
+ expect { subject.random_method }.to raise_error(NoMethodError)
104
+ end
97
105
  end
98
106
  end
99
107
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-publishable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
12
+ date: 2012-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
@@ -124,7 +124,6 @@ files:
124
124
  - README.md
125
125
  - Rakefile
126
126
  - lib/mongoid-publishable.rb
127
- - lib/mongoid/.DS_Store
128
127
  - lib/mongoid/publishable.rb
129
128
  - lib/mongoid/publishable/callback.rb
130
129
  - lib/mongoid/publishable/callback_collection.rb
@@ -167,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
166
  version: '0'
168
167
  segments:
169
168
  - 0
170
- hash: 4491913414913790925
169
+ hash: -138579093734556963
171
170
  required_rubygems_version: !ruby/object:Gem::Requirement
172
171
  none: false
173
172
  requirements:
@@ -176,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
175
  version: '0'
177
176
  segments:
178
177
  - 0
179
- hash: 4491913414913790925
178
+ hash: -138579093734556963
180
179
  requirements: []
181
180
  rubyforge_project:
182
181
  rubygems_version: 1.8.24
Binary file