New: SMock for D6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

New: SMock for D6

TimM-3
Guys,

My little trial application for Dolphin has been something called SMock
(actually when writing my real test application I ended up missing having a
good framework for writing tests for objects I was still in the process of
creating).

Its basically a port with lots of improvements on earlier work I
collaborated on in Java (JMock). While I started out with a very simple Mock
class that used #doesNotUnderstand: I found that my tests weren't looking
very readable, and my error messages weren't very good. So I took the plunge
and wrote something more comprehensive.

As I'm rather new to deploying frameworks and stuff in Dolphin, I thought
mentioning it here might help me determine if SMock is useful and if it
loads correctly into other images.

I have tested it on both the Community and Standard editions.

Documentation is a bit limited, partly because I had more fun than I should
have in recording a Flash demo of how to use it.

One big word of warning: To get the SUnitBrowser improvements to work, I had
to patch SUnit. If you load the improvements, it does change SUnit so that
it stores the Exception that a failing tests generates (rather than throwing
it away). I have asked Joseph to make this change in the next version of
SUnit, and I think its a safe change, but there is the remote possibility it
could change how your current tests run. I would suggest trying this out in
a clean image (or at least backup your current image).

You can look at the demo and download the code here:
http://www.macta.f2s.com/Thoughts/smock.html

Tim