[rspec-users] Using RSpec to drive the design of a GUI desktop application

Matthijs Langenberg mlangenberg at gmail.com
Sat Nov 17 16:19:31 EST 2007

Hello everybody,
I've been using RSpec as a tool to create web applications for some time
now, in Rails, and using plain Ruby with WEBrick as well. The tool suits my
needs and the story runner is great.
Now there are things that aren't solvable on the web, you'll need a _real_
desktop application for those problems.

So I've toyed a bit around with various GUI libraries as wxRuby and
RubyCocoa, to get a feeling on how these libraries work and I love to create
native OS X applications using cocoa.
Of course, the next question that arose in my head was:"How do I drive the
design of an application using a BDD framework like RSpec?".

When writing a web application, it is relatively easy to simulate a HTTP
request to the app and crawl through the returned HTML, but for a desktop
application it's different, right?
The format (html) handled between the application, and the toolkit drawing
the actual screen isn't that open for a desktop application as it is for a
web application.

So, since we don't want to test the inner workings of the gui toolkit and we
only want to specify the behaviour of the code we write self, we must plug a
framework somewhere, to capture the actual calls to this toolkit to know if
our code is doing the right thing. At least, that's how I see it currently.
But how could that be done?


Matthijs Langenberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071117/412ed0e7/attachment.html 

More information about the rspec-users mailing list