restpack_serializer 0.4.18 → 0.4.19
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1934e0aa0c85eb7848c1426beceb87429524339
|
4
|
+
data.tar.gz: 3777393caff790b957880a535ef3903511434534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e5e801140067e5dad68a4714f901d08f211a5dffbd070c29a1492c968e317e27416ab9fd4647433ca06b856e41d45ad121f620679d6c11f2de2b2a4baef772f
|
7
|
+
data.tar.gz: cea188aef0a8675089deb643b7e0f8c8dee2cbcd5d6e750732ff872347463d1381571b6c5d17c642925cc14447c702f8e1967aa15703fad7f3aad6fe2b6f68e2
|
@@ -69,7 +69,7 @@ describe RestPack::Serializer do
|
|
69
69
|
}
|
70
70
|
end
|
71
71
|
|
72
|
-
context "
|
72
|
+
context "an array" do
|
73
73
|
let(:people) { [person, person] }
|
74
74
|
it "results in a serialized array" do
|
75
75
|
serializer.as_json(people).should == [
|
@@ -85,6 +85,12 @@ describe RestPack::Serializer do
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
+
context "nil" do
|
89
|
+
it "results in nil" do
|
90
|
+
serializer.as_json(nil).should == nil
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
88
94
|
context "with options" do
|
89
95
|
it "excludes specified attributes" do
|
90
96
|
serializer.as_json(person, { include_description?: false }).should == {
|