Skip to content

Commit

Permalink
Don't set Kaminari defaults for testing in initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mwean committed Sep 18, 2013
1 parent fafb4bc commit 79c3bfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 0 additions & 5 deletions config/initializers/kaminari.rb

This file was deleted.

10 changes: 6 additions & 4 deletions spec/features/articles_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
end

scenario 'articles are paginated' do
articles = FactoryGirl.create_list(:article, 2)
Article.paginates_per(1)
article1 = FactoryGirl.create(:article, pages: '1')
article2 = FactoryGirl.create(:article, pages: '2')
visit articles_path

expect(page).to have_content(articles.first.title)
expect(page).not_to have_content(articles.last.title)
expect(page).to have_content(article1.title)
expect(page).to have_no_content(article2.title)

click_on 'Next'

expect(page).to have_content(articles.last.title)
expect(page).to have_content(article2.title)
end
end

0 comments on commit 79c3bfc

Please sign in to comment.