Line 14 needs to change the test assertion method to be eq, rather than be.
So:
expect(gabby.name).to be("Gabby")
should be changed to:
expect(gabby.name).to eq("Gabby")
Otherwise, you get the following error message:
Failures:
1) Groundhog has a name
Failure/Error: expect(gabby.name).to be("Gabby")
expected #<String:1300> => "Gabby"
got #<String:1320> => "Gabby"
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
\# ./groundhog_spec.rb:14:in `block (2 levels) in <top (required)>'
Line 14 needs to change the test assertion method to be
eq
, rather thanbe
.So:
expect(gabby.name).to be("Gabby")
should be changed to:
expect(gabby.name).to eq("Gabby")
Otherwise, you get the following error message: