[openstreetmap/openstreetmap-website] User factories for user_roles_helper tests (#1483)
Andy Allan
notifications at github.com
Thu Mar 9 17:28:13 UTC 2017
I couldn't figure out a neat way to shorten these monster lines. The %() notation is a useful way to avoid the nested double-quotes, but the ruby parser then had problems splitting that over multiple lines, e.g.
```
expected = %(<a href=....)\
%(<picture><....)
^ruby got confused by the left bracket here
```
If anyone has a suggestion for breaking these lines then I'm all ears, otherwise I just extended the rubocop limit to the largest of the new strings.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/1483
-- Commit Summary --
* Create a super_user factory.
* Use user factory for user_roles_helper test
-- File Changes --
M .rubocop_todo.yml (2)
M test/controllers/user_roles_controller_test.rb (12)
M test/factories/user.rb (8)
M test/helpers/user_roles_helper_test.rb (47)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/1483.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1483.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1483
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170309/7ea4a5f2/attachment.html>
More information about the rails-dev
mailing list