Created
August 6, 2012 17:35
-
-
Save flazz/3276988 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
| class SomeClass | |
| def initialize a, b, c | |
| @a, @b, @c = a, b, c | |
| end | |
| def some_method | |
| do_something_with @a, | |
| some_work_with @b | |
| end | |
| def some_other_method | |
| something_with @a, @b | |
| end | |
| def yet_another | |
| @b.act_upon @a | |
| end | |
| def odd_ball_method | |
| @c.something_else @a | |
| end | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@b & @A are related strongly. @c, not so much.
when writing a test you'll notice that whatever mock you use for @c will be rarely considered. are that point i'd consider passing c as an argument to odd_ball_method or figuring out a different design altogether.