pagers 3.1.0 → 3.1.1

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/test/empty_test.rb CHANGED
@@ -2,31 +2,31 @@ require 'test_helper'
2
2
 
3
3
  class EmptyTest < ActiveSupport::TestCase
4
4
 
5
- test 'should have 1 page' do
5
+ test 'total pages' do
6
6
  assert_equal 1, relation.total_pages
7
7
  end
8
8
 
9
- test 'current page should be 1' do
9
+ test 'current page' do
10
10
  assert_equal 1, relation.current_page
11
11
  end
12
12
 
13
- test 'first page should be 1' do
13
+ test 'first page' do
14
14
  assert_equal 1, relation.first_page
15
15
  end
16
16
 
17
- test 'should have no previous page' do
17
+ test 'previous page' do
18
18
  assert_nil relation.previous_page
19
19
  end
20
20
 
21
- test 'should have no next page' do
21
+ test 'next page' do
22
22
  assert_nil relation.next_page
23
23
  end
24
24
 
25
- test 'last page should be 1' do
25
+ test 'last page' do
26
26
  assert_equal 1, relation.last_page
27
27
  end
28
28
 
29
- test 'should not be out of bounds' do
29
+ test 'out of bounds' do
30
30
  assert !relation.out_of_bounds?
31
31
  end
32
32
 
data/test/first_test.rb CHANGED
@@ -6,31 +6,31 @@ class FirstTest < ActiveSupport::TestCase
6
6
  10.times.each { |index| Record.create }
7
7
  end
8
8
 
9
- test 'should have 5 pages' do
9
+ test 'total pages' do
10
10
  assert_equal 5, relation.total_pages
11
11
  end
12
12
 
13
- test 'current page should be 1' do
13
+ test 'current page' do
14
14
  assert_equal 1, relation.current_page
15
15
  end
16
16
 
17
- test 'first page should be 1' do
17
+ test 'first page' do
18
18
  assert_equal 1, relation.first_page
19
19
  end
20
20
 
21
- test 'should have no previous page' do
21
+ test 'previous page' do
22
22
  assert_nil relation.previous_page
23
23
  end
24
24
 
25
- test 'next page should be 2' do
25
+ test 'next page' do
26
26
  assert_equal 2, relation.next_page
27
27
  end
28
28
 
29
- test 'last page shuold be 5' do
29
+ test 'last page' do
30
30
  assert_equal 5, relation.last_page
31
31
  end
32
32
 
33
- test 'should not be out of bounds' do
33
+ test 'out of bounds' do
34
34
  assert !relation.out_of_bounds?
35
35
  end
36
36
 
@@ -10,7 +10,7 @@ class GeneratorsTest < Rails::Generators::TestCase
10
10
  FileUtils.rm_rf self.destination_root
11
11
  end
12
12
 
13
- test 'generate initializer' do
13
+ test 'initializer generator' do
14
14
  run_generator
15
15
  assert_file 'config/initializers/pagers.rb'
16
16
  end
data/test/last_test.rb CHANGED
@@ -6,31 +6,31 @@ class LastTest < ActiveSupport::TestCase
6
6
  10.times.each { |index| Record.create }
7
7
  end
8
8
 
9
- test 'should have 5 pages' do
9
+ test 'total pages' do
10
10
  assert_equal 5, relation.total_pages
11
11
  end
12
12
 
13
- test 'current page should be 5' do
13
+ test 'current page' do
14
14
  assert_equal 5, relation.current_page
15
15
  end
16
16
 
17
- test 'first page should be 1' do
17
+ test 'first page' do
18
18
  assert_equal 1, relation.first_page
19
19
  end
20
20
 
21
- test 'should have previous page 4' do
21
+ test 'previous page' do
22
22
  assert_equal 4, relation.previous_page
23
23
  end
24
24
 
25
- test 'should not have next page' do
25
+ test 'next page' do
26
26
  assert_nil relation.next_page
27
27
  end
28
28
 
29
- test 'last page shuold be 5' do
29
+ test 'last page' do
30
30
  assert_equal 5, relation.last_page
31
31
  end
32
32
 
33
- test 'should not be out of bounds' do
33
+ test 'out of bounds' do
34
34
  assert !relation.out_of_bounds?
35
35
  end
36
36
 
data/test/middle_test.rb CHANGED
@@ -6,31 +6,31 @@ class MiddleTest < ActiveSupport::TestCase
6
6
  10.times.each { |index| Record.create }
7
7
  end
8
8
 
9
- test 'should have 5 pages' do
9
+ test 'total pages' do
10
10
  assert_equal 5, relation.total_pages
11
11
  end
12
12
 
13
- test 'current page should be 3' do
13
+ test 'current page' do
14
14
  assert_equal 3, relation.current_page
15
15
  end
16
16
 
17
- test 'first page should be 1' do
17
+ test 'first page' do
18
18
  assert_equal 1, relation.first_page
19
19
  end
20
20
 
21
- test 'should have previous page 2' do
21
+ test 'previous page' do
22
22
  assert_equal 2, relation.previous_page
23
23
  end
24
24
 
25
- test 'should have next page 4' do
25
+ test 'next page' do
26
26
  assert_equal 4, relation.next_page
27
27
  end
28
28
 
29
- test 'last page shuold be 5' do
29
+ test 'last page' do
30
30
  assert_equal 5, relation.last_page
31
31
  end
32
32
 
33
- test 'should not be out of bounds' do
33
+ test 'out of bounds' do
34
34
  assert !relation.out_of_bounds?
35
35
  end
36
36
 
data/test/padding_test.rb CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class PaddingTest < ActiveSupport::TestCase
4
4
 
5
- test 'padding not alter total pages' do
5
+ test 'total pages with padding' do
6
6
  19.times.each { |index| Record.create }
7
7
 
8
8
  relation = Record.page(1, length: 15, padding: 4)
data/test/route_test.rb CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class RouteTest < ActionDispatch::IntegrationTest
4
4
 
5
- test 'query page param' do
5
+ test 'query param' do
6
6
  Rails.application.routes.draw do
7
7
  get '/' => 'pages#index'
8
8
  end
@@ -18,7 +18,7 @@ class RouteTest < ActionDispatch::IntegrationTest
18
18
  assert_select 'li.current a[href=/?dummy=&amp;page=2]', '2'
19
19
  end
20
20
 
21
- test 'route page param' do
21
+ test 'route param' do
22
22
  Rails.application.routes.draw do
23
23
  get '(:page)' => 'pages#index'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagers
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-17 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,6 +52,7 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - MIT-LICENSE
55
+ - README.md
55
56
  - Rakefile
56
57
  - app/views/pagers/_main.html.erb
57
58
  - config/locales/en.yml