Sha256: 80695fb366503b242037d64df2a90708f15f3ad2729f5b20427d9054c7e41619
Contents?: true
Size: 468 Bytes
Versions: 7
Compression:
Stored size: 468 Bytes
Contents
module Controllers module Pagination def paginates(factory:, increment:) factory_string = factory.to_s factory = factory_string.underscore.to_sym factory_plural = factory_string.pluralize.underscore.to_sym number_of_results_for_two_pages = increment + 1 results = FactoryGirl.create_list(factory, number_of_results_for_two_pages) yield expect(assigns(factory_plural).count).to eq(increment) end end end
Version data entries
7 entries across 7 versions & 1 rubygems