SkillAgentSearch skills...

Poodr

My notes for Sandi Metz's great OOD book, "Practical Object-Oriented Design in Ruby." Rewrote her tests from Minitest to RSpec.

Install / Use

/learn @rayning0/Poodr
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Practical Object-Oriented Design in Ruby

by Sandi Metz

Here are my notes for each chapter of Sandi Metz's fantastic bible of good object-oriented design, which applies to ALL object-oriented languages and will be true for your whole software career. See my Markdown files (.md) for a summary of each chapter.

I rewrote all her Minitest software tests in RSpec.

Sandi's final versions of all her book code are in /lib.

To run all tests

In top level directory, to run all Minitest tests, type:

rake

To run all RSpec tests, type

rspec

2 of the tests will fail if you run them in bulk this way. However, if you test that 1 file directly, these 2 tests pass:

ruby test/ch9d_test.rb (Minitest)
rspec spec/ch9d_spec.rb (RSpec)

These 2 tests are for a mock "observer" object, to see if Gear actually sends it a message to :change. For some reason, the group rake and rspec way of running tests cannot deal with this mock object, thinking "observer" is nil.

However, testing just that 1 file will work. If you have questions/comments, please say hi:

  • Raymond Gan | rayning@gmail.com | http://twitter.com/rgan0

Related Skills

View on GitHub
GitHub Stars11
CategoryProduct
Updated3y ago
Forks3

Languages

Ruby

Security Score

60/100

Audited on Aug 13, 2022

No findings