https://bugzilla.wikimedia.org/show_bug.cgi?id=49867
Web browser: ---
Bug ID: 49867
Summary: Get rid of Ruby warnings
Product: Wikimedia
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Quality Assurance
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Cucumber step definition files[1] are full of code that causes Ruby to output
warnings.
Example:
$ ruby -cw features/step_definitions/aftv5_steps.rb
features/step_definitions/aftv5_steps.rb:1: warning: ambiguous first argument;
put parentheses or even spaces
...
Syntax OK
Cucumber fixed the problem in version 1.2.2[2][3] but we still have a lot of
code that was created using earlier versions.
The fix is easy.
Example:
Replace
Given /^I am at an AFTv5 page$/ do
visit AFTv5Page
end
With
Given(/^I am at an AFTv5 page$/) do
visit AFTv5Page
end
(Only parentheses are added.)
1:
https://github.com/wikimedia/qa-browsertests/tree/master/features/step_definitions
2: https://github.com/cucumber/cucumber/blob/master/History.md#122
3: https://github.com/cucumber/cucumber/issues/328
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l