Gentlemen, I know it's 3am, but I just couldn't sleep until I hacked
more at the RDingus.
Here's my gist fork:
http://gist.github.com/34995
I'm curious to hear what you think, Gary. Both of my implementation
and of my test coverage. :-)
I didn't quite remember some of the details of how Dingus worked, and
I took some ruby-ish liberties in this version. So there's a lot of
work left to integrate what else you learned in your usage of the
framework. But the simple test cases work out for me, and I can see
how I can start using this on my own projects!!
I fleshed out the Person and sandwich examples, too.
To give you a taste, here's some of the syntactical goodies you get.
d = RDingus.new
d.a_method
d.calls -> a_method()
d.b_method.returns :sandwich
d.c_method.d_method.returns :manwich
puts d.b_method # sandwich
puts d.c_method.d_method # manwich
d.remember(:me)
puts d.calls[0].args[0] # me
puts d.calls[0].method # remember
puts d.has_called?(:me) # true
# I used has_called? because it's used in
rspec as have_called(blah)
Let me know what you think!