spec/paginate/config_spec.rb in paginate-1.0.0 vs spec/paginate/config_spec.rb in paginate-1.0.1
- old
+ new
@@ -1,19 +1,24 @@
require "spec_helper"
describe Paginate::Config do
- it "should yield configuration class" do
- Paginate.setup do |config|
+ it "yields configuration class" do
+ Paginate.configure 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|
+ it "deprecates Paginate.setup method" do
+ Paginate.should_receive(:warn).once
+ Paginate.setup {}
+ 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}