It turns out, my understanding of objects has been half baked.
When you create classes, it is like making cookie cutters. Just because you have a cookie cutter that can stamp out cookies though, you do not have a cookie. This is where I was getting confused. I was not realizing that a class in itself is not inherently an instance of itself. You have to use the cookie cutter by stamping it into some dough in order to have a cookie. This cookie then is an instance.
An object is an instance of a class. If CookieCutter is the class, you could say x = CookieCutter.new, this would create a new CookieCutter instance. x becomes the reference to that object.
Even though this it pretty basic, it is powerful and important to get the connection right, especially, I find, when dealing with objects that create new objects inside of them when you are dealing with testing. This is where I realized I had the misunderstanding.
For example, when you have a class, let's say Messenger, and inside Messenger there is a method that looks like this...
```ruby def save @game.save end ```
Say you are writing a test for the save method. In rspec your code looks like this...
```ruby describe 'Messenger' do let(:messenger) { Messenger.new } it "should save a game" messenger.save end ```
In this case, there is no game that has been created. We could do something like this...
```ruby describe 'Messenger' do let(:messenger) { Messenger.new } let(game) { Game.new } it "should save a game" messenger.game.save end ```
or you could change the code to be like this...
```ruby def initialize @game = Game.new end def save @game.save end ```
Wasn't that fun!