The Cucumber Book, Second Edition: Chapter 10

Title: Name of book: The Cucumber Book, 2nd ed - Chapter 10
Example: Neither working through the example code nor downloading the code and using that works. The errors I get when running the code I worked through are as follows:

Scenario: Successful withdrawal from an account in credit # features/cash_withdrawal.feature:2
Given my account has been credited with $100 # features/step_definitions/account_steps.rb:1
Validation failed: Number has already been taken (ActiveRecord::RecordInvalid)
./features/support/world_extensions.rb:15:in my_account' ./features/step_definitions/account_steps.rb:2:in /^my account has been credited with $(\d+)$/’
features/cash_withdrawal.feature:3:in `Given my account has been credited with $100’
When I withdraw $20 # features/step_definitions/teller_steps.rb:3
Then $20 should be dispensed # features/step_definitions/cash_slot_steps.rb:1
And the balance of my account should be $80 # features/step_definitions/account_steps.rb:5

Failing Scenarios:
cucumber features/cash_withdrawal.feature:2 # Scenario: Successful withdrawal from an account in credit

1 scenario (1 failed)
4 steps (1 failed, 3 skipped)

I am not a Ruby programmer so I havent a clue what is going on here as I have faithfully replicated the example code in the book. Please help.

Thanks

@a03pl Hi John,

The author for this book is not on DevTalk, but I checked in with him, and unfortunately, he has moved on to other things and is not able to offer help and support for the book anymore. Perhaps some kind soul here on Devtalk who has some #ruby experience would be willing to help? Apologies for not being able to give you a solution.

Best wishes,
Margaret
The Pragmatic Bookshelf