rlmoser99 / ruby_rspec_TOP

A tutorial that I developed for students at The Odin Project to learn RSpec.

Home Page:https://github.com/TheOdinProject/ruby_testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible further explanation about unit testing and doubles?

rlmoser99 opened this issue · comments

# Unit testing relies on using doubles to test the object in isolation

"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.