Sha256: f35dba7eb7fa834f4e146b7b8952a63c3f507966fc545e79ae59b762a00c803a

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

require "spec_helper"

describe Paginate::Config do
  it "should yield configuration class" do
    Paginate.setup do |config|
      config.param_name = :p
      config.size  = 50
    end

    Paginate::Config.param_name.should == :p
    Paginate::Config.size.should == 50
  end

  it "should return configuration as hash" do
    Paginate.setup do |config|
      config.param_name = :p
      config.size = 25
    end

    options = {:param_name => :p, :size => 25}
    Paginate::Config.to_hash.should == options
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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