clearlynuts-woulda 0.2.3 → 0.2.4
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/README.textile +1 -1
- data/VERSION.yml +1 -1
- data/lib/woulda/will_paginate/macros.rb +2 -15
- metadata +2 -2
data/README.textile
CHANGED
data/VERSION.yml
CHANGED
@@ -1,27 +1,14 @@
|
|
1
1
|
module Woulda
|
2
2
|
module WillPaginate
|
3
3
|
module Macros
|
4
|
-
def
|
4
|
+
def should_have_per_page(collection_name, options)
|
5
5
|
size = options[:size] || 30
|
6
6
|
should "paginate #{size} #{collection_name} at a time" do
|
7
7
|
assert collection = assigns(collection_name), "Controller did not assign to @#{collection_name.to_s}."
|
8
|
-
assert_kind_of WillPaginate::Collection, collection, "@#{collection_name.to_s} was not a WillPaginate collection."
|
8
|
+
assert_kind_of ::WillPaginate::Collection, collection, "@#{collection_name.to_s} was not a WillPaginate collection."
|
9
9
|
assert_equal size, collection.per_page, "Expected #{size} items, but got #{collection.per_page}."
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
|
-
def should_have_per_page(count)
|
14
|
-
klass = self.name.gsub(/Test$/, '').constantize
|
15
|
-
context "#{klass}" do
|
16
|
-
should "respond to per_page" do
|
17
|
-
assert klass.respond_to?(:per_page), "#{klass} does not respond to :per_page"
|
18
|
-
end
|
19
|
-
|
20
|
-
should "have #{count} per page" do
|
21
|
-
assert_equal count, klass.per_page
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
12
|
end
|
26
13
|
end
|
27
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearlynuts-woulda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Hussey
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-04-
|
13
|
+
date: 2009-04-05 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|