spec/spec_helper.rb in grape-pagy-0.1.0 vs spec/spec_helper.rb in grape-pagy-0.2.0
- old
+ new
@@ -9,21 +9,21 @@
class TestAPI < Grape::API
helpers Grape::Pagy::Helpers
params do
- use :pagination, items: 5
+ use :pagy, items: 5, max_items: 6
end
get '' do
- paginate (1..12).to_a, max_items: 6
+ pagy (1..12).to_a
end
resource :sub do
params do
- use :pagination
+ use :pagy, items_param: :per_page
end
get '/' do
- paginate (1..12).to_a
+ pagy (1..12).to_a, count: 13
end
end
end
RSpec.configure do |config|