Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 887 Bytes

File metadata and controls

36 lines (22 loc) · 887 Bytes

Testing Relationships Between Classes

Quickstart

Clone, then:

$ bundle install
$ rspec
# You should see four pending tests

Instructions

Fill in the four tests in spec/secret_diary_spec.rb.

Don't:

  • Change secret_diary.rb
  • Add any new files
  • Create any new classes

Do:

Check your work

Remove lines 23 (@diary.read) and 28 (@diary.write(new_message)) from lib/secret_diary.rb.

Does SecretDiary still do what it's supposed to do?

Do your tests still pass or do they fail?

If your tests still pass, is there any way to write them which means they will fail if SecretDiary is broken in this way?