require'spec_helper'describe'Snippets tab on a user profile',feature: true,js: truedoincludeWaitForAjaxlet(:user){create(:user)}context'when the user has snippets'dobeforedocreate_list(:snippet,25,:public,author: user)visituser_path(user)page.within('.user-profile-nav'){click_link'Snippets'}wait_for_ajaxendit'is limited to 20 items per page'doexpect(page.all('.snippets-list-holder .snippet-row').count).toeq(20)endcontext'clicking on the link to the second page'dobefore{click_link('2')}it'shows the remaining snippets'doexpect(page.all('.snippets-list-holder .snippet-row').count).toeq(5)endendendend