Created
September 29, 2014 10:48
-
-
Save ravelll/eeee5dc0ebdb83a80c38 to your computer and use it in GitHub Desktop.
ヒント 10-5-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "pagination" do | |
before(:each) do | |
sign_in user | |
visit users_path | |
end | |
context 'When user has 30 microposts' do | |
let!(:Micropost) { 30.times { FactoryGirl.create(:micropost, user: user) } } | |
# micropost にあたるタグが30個ある | |
# 次へボタンがない | |
end | |
context 'When user has more than 30 microposts' do | |
let!(:Micropost) { 31.times { FactoryGirl.create(:micropost, user: user) } } | |
# 1ページ目に行く | |
# micropost にあたるタグが30個ある | |
# 次へボタンが有る | |
# 2ページ目に行く | |
# micropost にあたるタグが1個ある | |
# 戻るボタンが有る | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment