Specify that the new db instance we are creating is an instance of Datbase::InMemory
Add first describe block to in_memory_spec. We're going to let db represent a new instance of Database::InMemory. Before we run any tests, we are going to clear everything and reset the database.
describe the user creation process. Bug: uninitialized constant ZombieDice::Database (NameError).
remove timecop
replace timeline with zombie_dice. duh. this fixes the previous issue. rpsec works now.
implement create_users method. Now test fails on "undefined method '+' for nil:NilClass"
add a @user_counter_id instance variable to the in_memory.rb file so that the create_user method can add an id to the user
remove extraneous module ZombieDice
create user entity
We can remove "attrs &&" by setting attr to have a default value of {} instead of nil. That way, if attrs is blank, the each loop won't break. The each loop will still break if nil is passed in manually as an attribute. Is this a problem?
Set an instance variable @users to be equal to an empty array. When a user is created, it's added to this array. Tests now pass.
require pry-debugger, change hash notation from hash rocket to colon
add pretty colors to spec
failing test for creating a game
changed entity.rb back to attrs && attrs.each
create an instance variable @game_id_counter and a create_game method. TODO: Add a game entity
Remove .tap from Game.new(attrs) because we aren't passing a block to it. You can only use .tap when you give it a block.
Create a Game entity
Test that a new user has a score of 0
When a user is created, she has a score of 0