simply_paginate 0.0.5 → 0.0.6

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: 39276d355bff6efc4caf226f0c12651ceb5f57cb
4
- data.tar.gz: 74c736370477949887a729652a116d43ff0cf880
3
+ metadata.gz: 4389214a447d6c690fbbdf4c8e1edcf597830ba8
4
+ data.tar.gz: e9f6a27ddcc799b774f69fa97e134a007b62ad52
5
5
  SHA512:
6
- metadata.gz: 828ca2c53d150cd0e29e9da3aea11e573dd89e843a3d663ccaa2bfe3e4b7a9e24bb647f5a030ba50b5e7daa6899a9d63eeae4c6f3dc7887d09eaa07fd744d164
7
- data.tar.gz: 61ded93564918688aecc72ca5d1243b02464bc536303f5e053459b6dd4355cfa341bc292b247b2641844a69bb2774ef1f1e3ee9dc77940cae7ad42bb6b1c3d79
6
+ metadata.gz: 42d9ac2f3bc1072b718c4ec1da9c91290f9aa0e16fb5f237cac0d70db8a4168f9bdb66f7606ac50266967d89b775e99a40304f917374bf784cab41df4de5de93
7
+ data.tar.gz: e143d914456f578ee469019054e5d8bbb78b207002274f152d8f0a34b4ee130dbe87871cae98d65b5937ce9515bcaa6501742085b76a30f50ebf7a870b27a364
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simply_paginate (0.0.5)
4
+ simply_paginate (0.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -29,6 +29,8 @@ module SimplyPaginate
29
29
  end
30
30
 
31
31
  def ==(other)
32
+ return false unless other.respond_to?(:index) && other.respond_to?(:elements)
33
+
32
34
  (index == other.index) && (elements == other.elements)
33
35
  end
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module SimplyPaginate
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -34,6 +34,11 @@ describe Page do
34
34
  end
35
35
 
36
36
  context "when they are different" do
37
+ context "and other is not a page" do
38
+ let(:other_page) { "definitely not a page" }
39
+ specify { expect(subject).to eq(false) }
40
+ end
41
+
37
42
  context "and the second has different values" do
38
43
  before(:each) do
39
44
  allow(other_page).to receive(:index).and_return(1)
@@ -80,6 +85,11 @@ describe Page do
80
85
  end
81
86
 
82
87
  context "when they are different" do
88
+ context "and other is not a page" do
89
+ let(:other_page) { "definitely not a page" }
90
+ specify { expect(subject).to eq(false) }
91
+ end
92
+
83
93
  context "because the second has different values" do
84
94
  before(:each) do
85
95
  allow(other_page).to receive(:index).and_return(1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simply_paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Álvaro F. Lara