Well, I finally did it, I released my first open source software, <a
href="http://ljrb.rubyforge.org">RJournal</a>. RJournal is a very
simple LiveJournal client written in pure Ruby. It's licensed under
the MIT license, so you can do pretty much anything you want with it.
It's a first release, so I expect that it's full of bugs and
exceedingly rough to use, but please let me know what you thought, and
drop me some comments. I also expect that right now, only geeks will
be able to use it, so the people who don't know much about computers
will probably not be able to run it just yet.
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.
Well, I finally did it, I released my first open source software, <a
href="http://ljrb.rubyforge.org">RJournal</a>.
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:
I found this Test::Unit::Mock thing
(http://www.deveiate.org/code/Test-Unit-Mock.html), but the
documentation is really hard ro understand. Maybe it's because I'm not
familiar with the whole mock objects concept, I should try reading up
on that first. Anybody has any good links?
I found this Test::Unit::Mock thing
(http://www.deveiate.org/code/Test-Unit-Mock.html\), but the
documentation is really hard ro understand. Maybe it's because I'm not
familiar with the whole mock objects concept, I should try reading up
on that first. Anybody has any good links?
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.