# IronRuby projects newsletter

**URL:** <https://www.ruby-forum.com/t/ironruby-projects-newsletter/167451>\
**Category:** IronRuby\
**Created:** [May 7, 2009, 9:23pm UTC](https://www.ruby-forum.com/t/ironruby-projects-newsletter/167451 "2009-05-07T21:23:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [May 7, 2009, 9:23pm UTC](https://www.ruby-forum.com/t/ironruby-projects-newsletter/167451/1 "2009-05-07T21:23:48Z")

</div>

This “newsletter” is just part of the contents of  
[http://wiki.github.com/ironruby/ironruby/contributing](http://wiki.github.com/ironruby/ironruby/contributing) for your reading  
convenience, filtered down to projects with an updated status since last  
time. A number of the projects have made good progress since a few weeks  
ago. Please take a look at the projects that interest you, give feedback  
to the project owners for bugs or features you care about, and discuss  
ways of being involved if you are interested.

Regards,  
Shri

Mixing Ruby mocking with .NET mocking frameworks

Mark R., Ivan Porto C.

Investigated Moq and NMock and found that they were not a good match. A  
project called Caricature[http://github.com/casualjim/caricature/](http://github.com/casualjim/caricature/) has  
been started to implement mocking directly in IronRuby

Hpricot[http://github.com/nrk/ironruby-hpricot/](http://github.com/nrk/ironruby-hpricot/)

Daniele A.

Status: the master branch (compatible with Hpricot 0.6.164) and the  
0.7\_experimental branch (compatible with Hpricot 0.8.1) in the  
repository both pass all the tests of the original Hpricot test suite,  
what is left is a major clean up and some refinements to the code.

Json[http://github.com/nrk/ironruby-json](http://github.com/nrk/ironruby-json)

Daniele A.

Status: it somewhat works but needs to be tested, so bugs are expected  
at this stage. A rewriting of the original definition file for Ragel is  
planned to improve the C# code of the ParserEngine class which currently  
is not so object oriented.

IRDb[http://github.com/rvernagus/irdb](http://github.com/rvernagus/irdb)  
Project State: Alpha

Developer(s): Ray Vernagus[http://github.com/rvernagus](http://github.com/rvernagus)

A Ruby wrapper on top of the .NET Data Provider  
Model.[http://msdn.microsoft.com/en-us/library/a6cd7c08.aspx](http://msdn.microsoft.com/en-us/library/a6cd7c08.aspx) This  
wrapper will become the basis for an ActiveRecord adapter giving  
IronRuby developers the ability to use the ActiveRecord gem with their  
choice of database.

Rails[http://rubyonrails.org](http://rubyonrails.org)

Jimmy S., Ray Vernagus

Details status about setting up Rails, running the unit tests, etc, is  
at [IronRuby.net /](http://www.ironruby.net/Documentation/Rails).

OpenSSL[http://www.ruby-doc.org/stdlib/libdoc/openssl/rdoc/index.html](http://www.ruby-doc.org/stdlib/libdoc/openssl/rdoc/index.html)

Jirapong Nanta

Status: There are about 330 methods for OpenSSL library. Less than ten  
RubySpec[http://wiki.github.com/ironruby/ironruby/rubyspec](http://wiki.github.com/ironruby/ironruby/rubyspec) are  
available. The focus of the project will be implementation the  
functionality that is needed for RubyGems and Rails scenarios. e.g.  
OpenSSL::X509::Certificate. Current results of running mspec ci  
library\openssl can be found here[http://gist.github.com/100649](http://gist.github.com/100649).  
Work process:

- Checkout ruby 1.8 source code

- review OpenSsl implementation in C (ruby\_1\_8\ext\openssl)

- review OpenSsl usage in RubyGems (e.g.  
rubygems\lib\rubygems\gem\_openssl.rb)

- write RubySpec

- implement a wrapper to System.Security.Cryptography namespaces

- Refactor \< - \> Push

Some useful documentations can be found at  
[http://technorama.net/~oss/ruby/openssl/doc/](http://technorama.net/~oss/ruby/openssl/doc/)

Porting SOAP Weather  
Widget[http://silverlight.net/community/gallerydetail.aspx?cat=sl2](http://silverlight.net/community/gallerydetail.aspx?cat=sl2)

Shay F.

Status - project was created, started porting the Silverlight code.

RubyGems

Shri B., Jirapong Nanta

We have reduced the number of failueres from 200+ down to about 20. The  
current results are here[http://gist.github.com/92738](http://gist.github.com/92738). The tests can  
now be run from a  
Dev.bat[http://wiki.github.com/ironruby/ironruby/devbat](http://wiki.github.com/ironruby/ironruby/devbat) environment,  
and will soon be part of continuous integration. So this project is  
mostly wrapping up (successfully).

Cucumber

Chamini Gallage

Blocking IronRuby bug has been fixed. Need to try again with a newer  
IronRuby version

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [May 10, 2009, 3:01am UTC](https://www.ruby-forum.com/t/ironruby-projects-newsletter/167451/2 "2009-05-10T03:01:12Z")

</div>

Hi everyone,

Ivan and I have taken the interesting approach to collaboration by each  
working on our own subtly different mock objects implementation,  
communicating regularly and stealing each other’s ideas where necessary.  
I released my crude attempt yesterday in case anyone wants to play  
around  
with it:

gem install markryall-orangutan (from [gems.github.com](http://gems.github.com))

or

gem install orangutan (from rubyforge)

At this stage, you can only create stubs that implement a clr interface  
(as  
well as pure ruby stubs) and then tell them how to behave (return  
values,  
raise errors and yield values). I’ll add subclassing of clr classes and  
a  
nicer DSL for checking what actually happened.

See [GitHub - markryall/orangutan: .net mocking library for ironruby](http://github.com/markryall/orangutan/tree/master) and  
[GitHub - casualjim/caricature: IronRuby mocking library](http://github.com/casualjim/caricature/tree/master)

Before long, we’ll combine our efforts into one super mock object  
library  
that will mock objects like they’ve never been mocked before.

Mark.

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [May 10, 2009, 10:09am UTC](https://www.ruby-forum.com/t/ironruby-projects-newsletter/167451/3 "2009-05-10T10:09:56Z")

</div>

Yesterday I actually finished my implementation I think. I will  
probably  
need to add some more matchers and expectations.I’m now documenting the  
thing, creating the gemspecs and applying to rubyforge so that I can  
release  
the gem on rubyforge too.

> From the start I wanted to do away with names like mock, stub, record,  
> replay, verify etc. Instead I took the advice from Roy Osherhove and  
> went  
> with a name of Isolator (Isolation might be better though) for creating  
> a  
> mock.

An Isolator will create what in Rhino.Mocks would be called a  
PartialDynamicMock 🙂 In Moq it would be the Loose mocking strategy.

The naming of the methods for creating mocks is the one that JP Boodhoo  
proposed WhenToldTo and WasToldTo.  
To specify a stub/expectation on a mock you have one and only one way of  
doing that with the method called when\_told\_to.  
Then when you’re asserting you can use the was\_told\_to method

mock = Isolator.for(Ninja)  
mock.when\_told\_to(:attack) do |exp|  
exp.with(:shuriken)  
exp.return(3)  
end

Battle.new(mock)  
battle.combat

mock.was\_told\_to?(:attack).should.be.successful

Caricature handles interfaces, interface inheritance, CLR objects, CLR  
object instances, Ruby classes and instances of Ruby classes.

I only embarked on this project because I really want to get IronRubyMVC  
spec’ed with a ruby testing framework, on the other hand it has been  
good  
fun.

So now I’m trying to find out if people actually want more from a  
mocking  
library than setting expectations, verifying those expectations on  
arguments  
and/or number of times called.

I find that when I use mocking I tend to stay away of the fancy stuff  
and  
that it was this fancy stuff that confused the hell out of me in the  
beginning because I needed to give it a place (which turned out to be  
oblivion 🙂 ) Along with all the confusion that grew out of StrictMock,  
DynamicMock, PartialMock and Stub.

So if anybody is up to reviewing the code please do. I welcome all  
suggestions, issue submissions etc.

I couldn’t add support for events yet and commented out the spec that  
tests  
that. I saw a tweet passing by from Curt where he was too tired to test  
the  
event support. Then downloaded the latest git but it still won’t work.  
Do I  
need to submit a bug for that or just be a little bit more patient ?

* * *

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
GSM: +32.486.787.582  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

Bernard  
Baruch[http://www.brainyquote.com/quotes/authors/b/bernard\_baruch.html](http://www.brainyquote.com/quotes/authors/b/bernard_baruch.html)

- “Vote for the man who promises least; he’ll be the least  
disappointing.”
