diff options
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/integration_spec_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/integration_spec_helper.rb b/spec/support/integration_spec_helper.rb index 78efb9027..1bf211fe1 100644 --- a/spec/support/integration_spec_helper.rb +++ b/spec/support/integration_spec_helper.rb @@ -1,7 +1,11 @@ module IntegrationSpecHelper def paginate_collection klass, decorator, page=1 - ModelDecorator.decorate( klass.page(page), with: decorator ) + coll = klass.page(page) + if decorator + coll = ModelDecorator.decorate( coll, with: decorator ) + end + coll end def build_paginated_collection factory, decorator, opts={} |
