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 CHANGED
@@ -55,7 +55,7 @@ end
55
55
 
56
56
  # will_paginate
57
57
  class PostTest < Test::Unit::TestCase
58
- should_have_per_page 10
58
+ should_have_per_page :posts, :size => 10
59
59
  end
60
60
 
61
61
  # acts_as_solr
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 2
3
- :patch: 3
3
+ :patch: 4
4
4
  :major: 0
@@ -1,27 +1,14 @@
1
1
  module Woulda
2
2
  module WillPaginate
3
3
  module Macros
4
- def self.should_have_per_page(collection_name, options)
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.3
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-04 00:00:00 -07:00
13
+ date: 2009-04-05 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency