[QA] better page object explanation, colon confusion
S Page
spage at wikimedia.org
Mon Oct 27 18:35:21 UTC 2014
On Mon, Oct 27, 2014 at 8:48 AM, Ċ½eljko Filipin <zfilipin at wikimedia.org>
wrote:
> `:id => 'an_id'` and `id: "firstHeading"` are Ruby hashes. The former is
> the Ruby 1.8 syntax (hash rocket), the latter is Ruby 1.9+ syntax.
>
Thanks, I mentioned in
https://www.mediawiki.org/wiki/Quality_Assurance/Browser_testing/Writing_tests#Page_Objects
More information:
>
> https://github.com/bbatsov/ruby-style-guide#no-mixed-hash-syntaces
>
Interesting, Ruby seems like Perl with more than one way to do it but is
better with evolving recommended practices.
RuboCop is instructed to allow both, at the moment.
>
Please can we not do that, do any of our browser tests even support Ruby
1.8? I don't want to keep stylistic alternatives in my brain when a machine
can enforce a well-documented style guide.
Thanks,
--
=S Page Features engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20141027/18069727/attachment-0001.html>
More information about the QA
mailing list