aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorZog2017-12-21 11:14:23 +0100
committerZog2017-12-21 11:46:45 +0100
commit4eadd762a0005e3e452aa757495e02dc244db3dc (patch)
tree4c191dee79e979c81939acb276852e9dcb2c4eb8 /spec/support
parent38ba7259702dccc5e2ee225e33a0c5390b2ad418 (diff)
downloadchouette-core-4eadd762a0005e3e452aa757495e02dc244db3dc.tar.bz2
Refs #5355 @0.5h; Add opposite route button on timetables
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/integration_spec_helper.rb6
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={}