Skip to content

Commit

Permalink
Coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Oct 10, 2024
1 parent 599ab2b commit 2aa97bb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions spec/lib/smart_listing/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
Expand Down Expand Up @@ -231,8 +234,4 @@
end
end
end

def build_list(options: {})
SmartListing::Base.new(:users, User.all, options)
end
end

0 comments on commit 2aa97bb

Please sign in to comment.