frozen_record 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/frozen_record/base.rb +4 -0
- data/lib/frozen_record/version.rb +1 -1
- data/spec/frozen_record_spec.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddd2c7d5a3193c955747df36c966af51301a635f
|
4
|
+
data.tar.gz: 1d8ca8bd18703b5e6a0ab7d6009b3c4c942cf0d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6087f508fd4dff8578a36f9d79a7cf04aa714d1a44df723be848863f5ac492e8e291dede1249802b5b18ab4e158c6baf7ec7e1ebc8986aa547a3e0315a13c71c
|
7
|
+
data.tar.gz: 790171c1c06b52001c53e2e7a2447acb8ad44cfb4f95f5cc4dcb8fcf4d2b26fed286afe9090847f46c06f959a6d7cf2007635fd314fb6d093490a748d41a56d2
|
data/lib/frozen_record/base.rb
CHANGED
data/spec/frozen_record_spec.rb
CHANGED
@@ -45,7 +45,7 @@ describe FrozenRecord::Base do
|
|
45
45
|
expect(attributes).to be == {
|
46
46
|
'id' => 1,
|
47
47
|
'name' => 'Canada',
|
48
|
-
'capital' => 'Ottawa',
|
48
|
+
'capital' => 'Ottawa',
|
49
49
|
'density' => 3.5,
|
50
50
|
'population' => 33.88,
|
51
51
|
'founded_on' => Date.parse('1867-07-01'),
|
@@ -97,4 +97,15 @@ describe FrozenRecord::Base do
|
|
97
97
|
|
98
98
|
end
|
99
99
|
|
100
|
+
describe '#count' do
|
101
|
+
|
102
|
+
it 'can count objects with no records' do
|
103
|
+
expect(Car.count).to be 0
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'can count objects with records' do
|
107
|
+
expect(Country.count).to be 3
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
100
111
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frozen_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|