On Fri, Nov 22, 2013 at 10:41 AM, Richard J. [email protected]
I’m getting the error below, can someone explain what I need to do?
Failure/Error: @numbers.exchange(1).should be_true
private method ‘exchange’ called for #<Numbers_Game>
./numbers_spec.rb:55:in ‘block (2 levels) in <top (required)>’
It’s saying that at line 55 of numbers_spec.rb, you call
@numbers.exchange(1), but the “exchange” method is private, so you
can’t call it there. You need to rearrange your code so that you can
test it using only public methods. You can simply make exchange
public, or rethink how to expose that functionality.