diff options
| author | Zog | 2018-02-08 13:48:13 +0100 |
|---|---|---|
| committer | Zog | 2018-02-09 10:22:01 +0100 |
| commit | 708c2fbe2f579426972a45f9a716d844a8e825ae (patch) | |
| tree | a711770ea5c722106eed299ce5f63918de238384 /spec/support | |
| parent | 3e6f023f87984894c3d0c7e4d70ea65c8966f063 (diff) | |
| download | chouette-core-708c2fbe2f579426972a45f9a716d844a8e825ae.tar.bz2 | |
Refs #5669 @2h; Fix Specs
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/integration_spec_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/integration_spec_helper.rb b/spec/support/integration_spec_helper.rb index a9a31f232..7ba7e9f92 100644 --- a/spec/support/integration_spec_helper.rb +++ b/spec/support/integration_spec_helper.rb @@ -3,7 +3,11 @@ module IntegrationSpecHelper def paginate_collection klass, decorator, page=1, context={} collection = klass.page(page) if decorator - collection = ModelDecorator.decorate(collection, with: decorator, context: context) + if decorator < AF83::Decorator + collection = decorator.decorate(collection, context: context) + else + collection = ModelDecorator.decorate(collection, with: decorator, context: context) + end end collection end @@ -55,7 +59,7 @@ RSpec::Matchers.define :have_link_for_each_item do |collection, name, opts| end description { "have #{name} link for each item" } failure_message do - "expected view to have #{name} link for each item, failed with selector: \"#{@selector}\"" + "expected view to have one #{name} link for each item, failed with selector: \"#{@selector}\"" end end |
