Possible further explanation about unit testing and doubles?
rlmoser99 opened this issue · comments
ruby_rspec_TOP/spec/15_binary_game_spec.rb
Line 130 in 9300262
"why do we need a double when we have the RN class now (in a separate file)?" -> You want to test each class isolated from all other classes. (This also goes with our conversation about class encapsulation) So you use doubles to stand in for other objects that the class that you are testing 'needs'.
I am going to wait to work on this issue, until the current pull requests have been reviewed. This suggestion may have already been taken care of in other updates.