Created
September 9, 2014 20:39
-
-
Save noqcks/33257e01510d1bbdd276 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_relative 'spec_helper' | |
| # Since a Footman is a type of Unit, it makes sense to now make Footman inherit from Unit | |
| # Furthermore, | |
| # This test doesn't look for it, but there are other things that you could do at this point. Think about what else you could refactor in the Footman class, now that it is inheriting functionality (code) from the Unit class. | |
| describe Footman do | |
| subject(:footman) { Footman.new } | |
| it "should be a Unit" do | |
| expect(footman).to be_an_instance_of(Footman) | |
| # But should also be a Unit | |
| expect(footman).to be_a(Unit) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment