Sha256: 79626db169824c67858113d41c1b5cbf8c364c13c7274a293c94daca20da5ceb

Contents?: true

Size: 535 Bytes

Versions: 1

Compression:

Stored size: 535 Bytes

Contents

require "spec_helper"

describe Paginate::Config do
  it "yields configuration class" do
    Paginate.configure do |config|
      config.param_name = :p
      config.size  = 50
    end

    expect(Paginate::Config.param_name).to eql(:p)
    expect(Paginate::Config.size).to eql(50)
  end

  it "returns configuration as hash" do
    Paginate.configure do |config|
      config.param_name = :p
      config.size = 25
    end

    options = {:param_name => :p, :size => 25}
    expect(Paginate::Config.to_hash).to eql(options)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paginate-2.0.0 spec/paginate/config_spec.rb