couch_potato 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES.md +3 -0
- data/lib/couch_potato/persistence/type_caster.rb +1 -1
- data/lib/couch_potato/version.rb +1 -1
- data/spec/property_spec.rb +12 -4
- metadata +2 -2
data/CHANGES.md
CHANGED
data/lib/couch_potato/version.rb
CHANGED
data/spec/property_spec.rb
CHANGED
@@ -200,7 +200,7 @@ describe 'properties' do
|
|
200
200
|
end
|
201
201
|
|
202
202
|
describe "boolean properties" do
|
203
|
-
it "should persist '0'
|
203
|
+
it "should persist '0' as false" do
|
204
204
|
a = Address.new
|
205
205
|
a.verified = '0'
|
206
206
|
CouchPotato.database.save_document! a
|
@@ -208,7 +208,7 @@ describe 'properties' do
|
|
208
208
|
a.verified.should be_false
|
209
209
|
end
|
210
210
|
|
211
|
-
it "should persist 0
|
211
|
+
it "should persist 0 as false" do
|
212
212
|
a = Address.new
|
213
213
|
a.verified = 0
|
214
214
|
CouchPotato.database.save_document! a
|
@@ -216,7 +216,15 @@ describe 'properties' do
|
|
216
216
|
a.verified.should be_false
|
217
217
|
end
|
218
218
|
|
219
|
-
it "should persist '
|
219
|
+
it "should persist 'false' as false" do
|
220
|
+
a = Address.new
|
221
|
+
a.verified = 'false'
|
222
|
+
CouchPotato.database.save_document! a
|
223
|
+
a = CouchPotato.database.load_document a.id
|
224
|
+
a.verified.should be_false
|
225
|
+
end
|
226
|
+
|
227
|
+
it "should persist '1' as true" do
|
220
228
|
a = Address.new
|
221
229
|
a.verified = '1'
|
222
230
|
CouchPotato.database.save_document! a
|
@@ -224,7 +232,7 @@ describe 'properties' do
|
|
224
232
|
a.verified.should be_true
|
225
233
|
end
|
226
234
|
|
227
|
-
it "should persist 1
|
235
|
+
it "should persist 1 as true" do
|
228
236
|
a = Address.new
|
229
237
|
a.verified = 1
|
230
238
|
CouchPotato.database.save_document! a
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: couch_potato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alexander Lang
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-29 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|