Using ruby libraries with IronRuby

I have a bunch of things running around in my head that I’m curious
regarding IronRuby and I’m not sure where to find the answer. I figure
best bet is to drop my questions here.

The first question I have is what the current status is regarding using
existing Ruby libraries from IronRuby. One of the use cases where I
see a lot of .NET developers using IronRuby is for writing
specificiations/unit tests for their code. I’ve been experimenting with
testing some really simple classes written in C# with simple test and
like to see if/how IronRuby could get to the next level of testing which
might include being able to mock/stub behavior. I’ve used mocha a bit
on a
couple Ruby projects and am wondering if someone could help me
where IronRuby is in regards to being able to use a ruby library such as
mocha. The second part of the question is what is the best method for
determining what’s needed (but not yet implemented in IronRuby) for a
ruby library to run.

Now assuming it could run an external ruby library, how would you need
setup IronRuby to properly load it? I assume that’s coming when we get

  • yaml support and will just be a require ‘mocha’?


You can try requiring any existing libraries out there, but you’ll
likely to run into issues where IronRuby simply hasn’t implemented
either syntax or built-in libraries yet. Check the archives of this
list a bit, Wayne K. has been doing a fantastic job of testing ruby
gem’s setup.rb file (which is the first step to alot of things), the
wiki page for his findings is here:

Remember, the end goal of IronRuby is to run “real ruby programs”, so
yes it should just be “require mocha”, with perhaps some bridging
layer (written in ruby) being required.

On Wed, Apr 30, 2008 at 1:10 PM, Steve E. [email protected]

might include being able to mock/stub behavior. I’ve used mocha a bit on a

Ironruby-core mailing list
[email protected]

Michael L.
[Polymath Prokrammer]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs