cucumber converts string to integer?

I am doing some BDD but i've come across an issue i can't solve. I am trying to write this as my gherkin line that's visible in the step defintions:

When the user has 2 overdue books where the fine is payed (fine is 0)

But the text comes out to

the user has {int} overdue books where the fine is payed \\(fine is {int})

i've tried to escape with a backslash in front of the character and stringified the integers but that just converts them to strings.

Upvotes: 0

Views: 807

Answers (1)

M.P. Korstanje
M.P. Korstanje

Reputation: 12059

Cucumber is being helpful by suggesting what it thinks you might want your step definition to be. You don't have the follow it. This is also a valid cucumber-expression:

the user has 0 overdue books where the fine is payed \\(fine is 0)

Upvotes: 2

Related Questions