For the next release, I plan to add a GUI using Fox. The goal of
RJournal is to be a Ruby, cross-platform equivalent of <a
href="http://www.speirs.org/xjournal">XJournal</a>, a very, very nice
OS X LiveJournal client.
I also have a few questions regarding testing in the application: since
most operations have side effects (posting a new message to a journal,
creating a config file, an history file, updating an history file,
etc.), how do you effectively test those cases? Any input regarding
this will be much appreciated.
Vincent.
Congratulations! :)
> I also have a few questions regarding testing in the application: since
> most operations have side effects (posting a new message to a journal,
> creating a config file, an history file, updating an history file,
> etc.), how do you effectively test those cases? Any input regarding
> this will be much appreciated.
Assuming you are using unit tests [you ARE using unit tests, right? ;)],
you would need to use mock objects. An example of this concept is my
submission to the HighLine Ruby Quiz. In my case I rolled my own mock
object, but it might be better to use a library, such as this:
http://www.b13media.com/dev/ruby/mock.html
But I think the above still needs to be updated for Test::Unit (I think
it is using the older RubyUnit.)
Ryan
Check these out:
http://mockobjects.com/FrontPage.html
http://c2.com/cgi/wiki?MockObject
http://www.connextra.com/aboutUs/mockobjects.pdf
The Ruby version may seem a bit more complex because the nature of Ruby
allows for some fancy code that dynamically builds a mock object based
on the methods of a given class. But once you learn how this works it
will be easier to use than mock objects in statically typed languages
like Java.
Ryan