Transform /^line item (\d+)$/ do |line_string|
line_string.to_i
end
Thaks a lot
https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3
What I still can't work out is that if number.to_i is now built into version 3, then how would I use this in the Step Definition in the book where it uses the out of date Transform file.
When /^I should see “([^”]*)” as the subtotal for (line item \d+)$/ do |subtotal, line_item|
expect(on(ShoppingCartPage).subtotal_for_line_item(line_item)).to eql subtotal
end
Do I need to define this as a method again?
Thanks
Mark