Sha256: a35f1065ee954dd1d3b8f3ff53440559ecd8506ec9a25b709835bce2f72d3abb

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

require File.expand_path('../spec_helper', File.dirname(__FILE__))

describe Kaminari::Configuration do
  subject { Kaminari.config }
  describe 'default_per_page' do
    context 'by default' do
      its(:default_per_page) { should == 25 }
    end
    context 'configured via config block' do
      before do
        Kaminari.configure {|c| c.default_per_page = 17}
      end
      its(:default_per_page) { should == 17 }
      after do
        Kaminari.configure {|c| c.default_per_page = 25}
      end
    end
  end

  describe 'window' do
    context 'by default' do
      its(:window) { should == 4 }
    end
  end

  describe 'outer_window' do
    context 'by default' do
      its(:outer_window) { should == 0 }
    end
  end

  describe 'left' do
    context 'by default' do
      its(:left) { should == 0 }
    end
  end

  describe 'right' do
    context 'by default' do
      its(:right) { should == 0 }
    end
  end

  describe 'param_name' do
    context 'by default' do
      its(:param_name) { should == :page }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kaminari-0.12.3 spec/config/config_spec.rb
kaminari-0.12.2 spec/config/config_spec.rb
kaminari-0.12.1 spec/config/config_spec.rb