paginative 0.1.0 → 0.2.0

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.
@@ -127,14 +127,18 @@ describe TestModel do
127
127
 
128
128
  context "Multiple Columns" do
129
129
  before do
130
- @first = FactoryGirl.create(:test_model, name: 'abc', address: 'abc')
131
- @second = FactoryGirl.create(:test_model, name: 'abc', address: 'bcd')
132
- @third = FactoryGirl.create(:test_model, name: 'abc', address: 'cde')
133
- @fourth = FactoryGirl.create(:test_model, name: 'abc', address: 'def')
130
+ @first = FactoryGirl.create(:test_model, name: 'abc', address: 'abc', latitude: 140, longitude: 0)
131
+ @second = FactoryGirl.create(:test_model, name: 'abc', address: 'bcd', latitude: 150, longitude: 12)
132
+ @third = FactoryGirl.create(:test_model, name: 'abc', address: 'cde', latitude: 150, longitude: 15)
133
+ @fourth = FactoryGirl.create(:test_model, name: 'abc', address: 'def', latitude: 160, longitude: 2)
134
134
  end
135
135
 
136
- it 'can be paginated on the secondary column' do
136
+ it 'can be paginated on the secondary column (strings)' do
137
137
  expect(TestModel.with_field_from(["name", "address"], ["abc", "bcd"])).to eq [@third, @fourth]
138
138
  end
139
+
140
+ it 'can be paginated by a secondary column (integers)' do
141
+ expect(TestModel.with_field_from(["latitude", "longitude"], [150, 12])).to eq [@third, @fourth]
142
+ end
139
143
  end
140
144
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginative
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Norman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails