[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] RJournal 0.1.1

Vincent Foley

5/8/2005 9:55:00 PM

Well, I finally did it, I released my first open source software, <a
href="http://ljrb.rubyforge.org">RJournal.... 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 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.

3 Answers

Ryan Leavengood

5/8/2005 10:11:00 PM

0

Vincent Foley wrote:
> Well, I finally did it, I released my first open source software, <a
> href="http://ljrb.rubyforge.org">RJournal....

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...

But I think the above still needs to be updated for Test::Unit (I think
it is using the older RubyUnit.)

Ryan


Vincent Foley

5/9/2005 4:16:00 AM

0

I found this Test::Unit::Mock thing
(http://www.deveiate.org/code/Test-Unit...), 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?

Ryan Leavengood

5/9/2005 1:00:00 PM

0

Vincent Foley wrote:
> I found this Test::Unit::Mock thing
> (http://www.deveiate.org/code/Test-Unit...), 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?

Check these out:

http://mockobjects.com/Fron...
http://c2.com/cgi/wiki?...
http://www.connextra.com/aboutUs/mocko...

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