cistern 0.2.2 → 0.2.3
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/lib/cistern/collection.rb +1 -1
- data/lib/cistern/version.rb +1 -1
- data/spec/collection_spec.rb +15 -0
- metadata +3 -2
data/lib/cistern/collection.rb
CHANGED
data/lib/cistern/version.rb
CHANGED
data/spec/collection_spec.rb
CHANGED
@@ -13,6 +13,17 @@ describe "Cistern::Collection" do
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
+
it "should give to_s" do
|
17
|
+
collection = SampleCollection.new
|
18
|
+
collection.to_s.should_not eq "[]"
|
19
|
+
collection.to_s.gsub(/:[^>]*/,'').should == collection.all.to_s.gsub(/:[^>]*/,'')
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should give size and count" do
|
23
|
+
SampleCollection.new.size.should == 3
|
24
|
+
SampleCollection.new.count.should == 3
|
25
|
+
end
|
26
|
+
|
16
27
|
it "should give first" do
|
17
28
|
SampleCollection.new.first.should == SampleCollectionModel.new(id: 1)
|
18
29
|
end
|
@@ -32,4 +43,8 @@ describe "Cistern::Collection" do
|
|
32
43
|
it "should slice" do
|
33
44
|
SampleCollection.new.slice(0,2).should == [SampleCollectionModel.new(id: 1), SampleCollectionModel.new(id: 3, name: "tom")]
|
34
45
|
end
|
46
|
+
|
47
|
+
it "should ==" do
|
48
|
+
SampleCollection.new.all == SampleCollection.new.all
|
49
|
+
end
|
35
50
|
end
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: cistern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Josh Lane
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: API client framework extracted from Fog
|
15
15
|
email:
|
@@ -72,3 +72,4 @@ test_files:
|
|
72
72
|
- spec/collection_spec.rb
|
73
73
|
- spec/model_spec.rb
|
74
74
|
- spec/spec_helper.rb
|
75
|
+
has_rdoc:
|