Skip to content

Instantly share code, notes, and snippets.

def doCalc ()
return 1 + 2
end
def doAwesome (x)
return doCalc() + x
end
#before substitution...
def test ()
return doAwesome(3)
@steveshogren
steveshogren / gist:1548573
Created January 1, 2012 22:52
ConcreteMock
<?php
class Velocity {
public function __construct (PayoffCalc $PayoffCalc)
{
$this->_PayoffCalc = $PayoffCalc;
}
public function toFloat()
{
$paymentPerDay = $this->_PayoffCalc->getPaymentPerDay();