From 2aa97bb500dc27e067214eeff97e53204d694438 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Fri, 11 Oct 2024 01:16:54 +0200 Subject: [PATCH] Coding style --- spec/lib/smart_listing/base_spec.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/lib/smart_listing/base_spec.rb b/spec/lib/smart_listing/base_spec.rb index 07a1cee..3fe2056 100644 --- a/spec/lib/smart_listing/base_spec.rb +++ b/spec/lib/smart_listing/base_spec.rb @@ -3,8 +3,11 @@ require 'spec_helper' RSpec.describe SmartListing::Base do - describe '#per_page' do + def build_list(options: {}) + SmartListing::Base.new(:users, User.all, options) + end + describe '#per_page' do context 'when there is no specification in params or cookies' do it 'take first value in the page sizes' do options = { page_sizes: [1] } @@ -231,8 +234,4 @@ end end end - - def build_list(options: {}) - SmartListing::Base.new(:users, User.all, options) - end end