Permalink
Browse files

add spec for paginated_section for a single page

Fixes #90
  • Loading branch information...
1 parent a1f3971 commit ca42e3c7dec04bc596eb9c035a72f101bb2a169f @fabioyamate fabioyamate committed with Jul 27, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/view_helpers/action_view_spec.rb
@@ -177,6 +177,18 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
assert_select 'div.pagination', 2
assert_select 'div.pagination + div#developers', 1
end
+
+ it "should not render a paginated section with a single page" do
+ @template = <<-ERB
+ <%= paginated_section collection, options do %>
+ <%= content_tag :div, '', :id => "developers" %>
+ <% end %>
+ ERB
+
+ paginate(:total_entries => 1)
+ assert_select 'div.pagination', 0
+ assert_select 'div#developers', 1
+ end
## parameter handling in page links ##

0 comments on commit ca42e3c

Please sign in to comment.