small medium large xlarge

08 Oct 2016, 15:40
Russell Driver (1 post)


Chapter 7 - Sketching Out the Domain Model - on the below code, I get an error, Where as in the book it doesn’t give this error. I have ruby fully installed and cucumber. Any advice please? Error below with code:

Error: “ undefined method `eq’ for # (NoMethodError) "

Code: Given /^I have deposited $(\d+) in my account$/ do |amount| my_account = my_account.deposit(amount.to_i) my_account.balance.should eq(amount.to_i), “Expected the balance to be #{amount} but it was #{my_account.balance}” end

28 Oct 2016, 18:53
Matt Wynne (91 posts)

Hi Russel,

It looks like you don’t have the rspec gem installed. Can you check the way you followed the installation instructions for gems?

You must be logged in to comment