Skip to content

Commit

Permalink
Merge pull request #529 from joonty/better_paginated_name
Browse files Browse the repository at this point in the history
Rename Rubygem(s) to gem(s) in pagination
  • Loading branch information
sferik committed Feb 12, 2013
2 parents bbd3c1a + bed8244 commit d0843cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/rubygems/index.html.erb
Expand Up @@ -6,7 +6,7 @@
</ol>
</div>
<p class="entries">
<%= page_entries_info @gems, :entry_name => 'gem' %>
<%= page_entries_info @gems, :entry_name => 'gem', :model => 'gem' %>
</p>
<div class="gems border">
<ol>
Expand Down
2 changes: 1 addition & 1 deletion app/views/searches/show.html.erb
Expand Up @@ -11,7 +11,7 @@
<% end %>

<p class="entries">
<%= page_entries_info(@gems, :entry_name => 'gem').html_safe %>
<%= page_entries_info(@gems, :entry_name => 'gem', :model => 'gem').html_safe %>
</p>
<% if @gems.present? %>
<div class="gems border">
Expand Down
3 changes: 3 additions & 0 deletions test/functional/rubygems_controller_test.rb
Expand Up @@ -189,6 +189,9 @@ class RubygemsControllerTest < ActionController::TestCase
should "display uppercase A" do
assert page.has_content?("starting with A")
end
should "display 'gems' in pagination summary" do
assert page.has_content?("all #{@gems.count} gems")
end
end

context "On GET to index as an atom feed" do
Expand Down
3 changes: 3 additions & 0 deletions test/functional/searches_controller_test.rb
Expand Up @@ -47,5 +47,8 @@ class SearchesControllerTest < ActionController::TestCase
assert ! page.has_content?(@brando.name)
assert ! page.has_selector?("a[href='#{rubygem_path(@brando)}']")
end
should "display 'gems' in pagination summary" do
assert page.has_content?("all 2 gems")
end
end
end

0 comments on commit d0843cb

Please sign in to comment.