aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorAlban Peignier2017-12-21 21:00:33 +0100
committerGitHub2017-12-21 21:00:33 +0100
commite722b3de7928eabba8ecc3f66b9275bfd0438904 (patch)
tree08bbecfd49c0625e9fb11ea39e0a106e95c775bf /spec/support
parent93434ece5f7f5118f8342ff1bbe845458009f3eb (diff)
parent780b7e4711e983e8f99e71bacc7eaf6973b214ce (diff)
downloadchouette-core-e722b3de7928eabba8ecc3f66b9275bfd0438904.tar.bz2
Merge pull request #172 from af83/5355-add-button-to-opposite-itinerary-timetable
Add opposite route button on timetables. Refs #5355
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={}