<commit_before># encoding: UTF-8
require 'spec_helper'
describe "pagination" do
  before(:each) do
    41.times { |i| Factory(:posts_revision, title: "post #{i}") }
    @posts_per_page = 10 # TODO: should be set the same as the model's per_page
  end

  it "should not show all posts" do
    visit "/monologue"
    page.should_not have_content("post #{@posts_per_page + 1}")
  end

  it "can go to older posts" do
    visit "/monologue/"
    home_page = page.html
    click_on "Older posts"
    page.html.should_not eq(home_page)
  end

  it "can go to newer posts" do<commit_msg>pagination spec now uses dummy app posts_per_page setting<commit_after># encoding: UTF-8
require 'spec_helper'
describe "pagination" do
  before(:each) do
    41.times { |i| Factory(:posts_revision, title: "post #{i}") }
    @posts_per_page = Monologue.posts_per_page
  end

  it "should not show all posts" do
    visit "/monologue"
    page.should_not have_content("post #{@posts_per_page + 1}")
  end

  it "can go to older posts" do
    visit "/monologue/"
    home_page = page.html
    click_on "Older posts"
    page.html.should_not eq(home_page)
  end

  it "can go to newer posts" do
{'fraction_non_alphanumeric': 0.107600341588386, 'fraction_numerical': 0.008539709649871904, 'mean_word_length': 3.5426356589147288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6416810', 'n_tokens_mistral': 419, 'n_tokens_neox': 405, 'n_words': 130}