Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweak spec for sinatra again

  • Loading branch information...
commit ce545120edee17d4cab948a88ee0b34a2d348751 1 parent c9ace59
@yuki24 yuki24 authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 spec/helpers/action_view_extension_spec.rb
View
12 spec/helpers/action_view_extension_spec.rb
@@ -248,7 +248,7 @@
describe '#rel_next_prev_link_tags' do
before do
- 75.times {|i| User.create! :name => "user#{i}"}
+ 80.times {|i| User.create! :name => "user#{i}"}
end
context 'the first page' do
@@ -264,24 +264,24 @@
context 'the middle page' do
before do
- @users = User.page(2).per(25)
+ @users = User.page(3).per(25)
end
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
it { should match(/rel="prev"/) }
- it { should match(/\?page=1/) }
+ it { should match(/\?page=2/) }
it { should match(/rel="next"/) }
- it { should match(/\?page=3/) }
+ it { should match(/\?page=4/) }
end
context 'the last page' do
before do
- @users = User.page(3).per(25)
+ @users = User.page(4).per(25)
end
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
it { should match(/rel="prev"/) }
- it { should match(/\?page=2"/) }
+ it { should match(/\?page=3"/) }
it { should_not match(/rel="next"/) }
end
end

0 comments on commit ce54512

Please sign in to comment.
Something went wrong with that request. Please try again.