By David Heinemeier Hansson on Jan 6, 2013 In languages less open than Ruby, hard-coded class references can make testing tough. If your Java code has Date date = new Date(); buried in its guts, how do you set it to a known value you can then compare against in your tests? Well, you don't. So what you do instead is pass in the date as part of the parameters to your method. You inject the dependenc
{{#tags}}- {{label}}
{{/tags}}