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

Move meaningful name explanation from 14 to first time it is needed

rlmoser99 opened this issue · comments

# In a long test file, it can be helpful to declare variables in each
# describe block, to make the tests more readable. When creating another
# instance of the random number and/or subject, use a meaningful name to
# differentiate between instances.

# Create a subject and random_number double with meaningful names.
# A helpful tip is to combine the purpose of the test and the object.
# E.g., ending_number & ending_game or completing_random & completing_game.