Created
September 17, 2012 00:17
-
-
Save jbrechtel/3734950 to your computer and use it in GitHub Desktop.
really bad cake pattern example
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
| class Foo { | |
| val emailer: EmailService | |
| } | |
| trait Fakes { | |
| val emailer = new FakeEmailService() | |
| } | |
| trait RealThings { | |
| val emailer = new SmtpEmailService() | |
| } | |
| val fakeFoo = new Foo with Fakes | |
| val realFoo = new Foo with RealThing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment