<commit_before>require 'spec_helper'
include Kaminari::Helpers

describe 'Kaminari::Helpers::Paginator' do
  let :template do
    stub(r = Object.new) do
      render.with_any_args
      params { {} }
      options { {} }
      url_for {|h| "/foo?page=#{h[:page]}"}
    end
    r
  end

  describe '#params' do
    before do
      @paginator = Paginator.new(template, :params => {:controller => 'foo', :action => 'bar'})
    end
    subject { @paginator.page_tag(template).instance_variable_get('@params') }
    it { should == {:controller => 'foo', :action => 'bar'} }

    context "when params has form params" do
      before do
        stub(template).params do
          {
            :authenticity_token => "token",
            :commit => "submit",
            :utf8 => "✓",
            :_method => "patch"
          }<commit_msg>Do not use unicode characters<commit_after>require 'spec_helper'
include Kaminari::Helpers

describe 'Kaminari::Helpers::Paginator' do
  let :template do
    stub(r = Object.new) do
      render.with_any_args
      params { {} }
      options { {} }
      url_for {|h| "/foo?page=#{h[:page]}"}
    end
    r
  end

  describe '#params' do
    before do
      @paginator = Paginator.new(template, :params => {:controller => 'foo', :action => 'bar'})
    end
    subject { @paginator.page_tag(template).instance_variable_get('@params') }
    it { should == {:controller => 'foo', :action => 'bar'} }

    context "when params has form params" do
      before do
        stub(template).params do
          {
            :authenticity_token => "token",
            :commit => "submit",
            :utf8 => "true",
            :_method => "patch"
          }
{'fraction_non_alphanumeric': 0.1497927767910006, 'fraction_numerical': 0.0011841326228537595, 'mean_word_length': 2.414141414141414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '7459661', 'n_tokens_mistral': 530, 'n_tokens_neox': 520, 'n_words': 128}