page_up 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/page_up/pages.rb +1 -1
- data/lib/page_up/version.rb +1 -1
- data/spec/page_up/pages_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37a199ec307390fa484222d921ce7e44d1c1fbcc
|
4
|
+
data.tar.gz: ef1a8bd2fda2d1364263a6183b3534cfce05f35d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c896f4d1225d9e0054735a88a01fd31c19b94a58c2a4b2894902e21fd5a9495875eaf331ac82cfb0deb0a9a1b7ccb458611f42e374fcb20f18b4ec9b93dbffb5
|
7
|
+
data.tar.gz: b235f20a0f9d61b64624bae4f53281e6dab714eb0e82664cac1fbe3d34a4b072be31e40dce25a2ff38bcada796b66a599335625260bc25259da3b0a9eef8fc12
|
data/lib/page_up/pages.rb
CHANGED
data/lib/page_up/version.rb
CHANGED
data/spec/page_up/pages_spec.rb
CHANGED
@@ -58,4 +58,11 @@ describe "pagination" do
|
|
58
58
|
specify { expect(PageUp[collection,3,5].current_slice).to eq 1..3 }
|
59
59
|
end
|
60
60
|
|
61
|
+
it "handles partial pages" do
|
62
|
+
expect(PageUp[(1..5).to_a,1, 10]).to eq (1..5).to_a
|
63
|
+
end
|
64
|
+
|
65
|
+
it "handles pages out of range" do
|
66
|
+
expect(PageUp[(1..5).to_a,2, 10]).to eq []
|
67
|
+
end
|
61
68
|
end
|