Is it possible to compile IronRuby code to a .NET assembly (EXE or DLL)

Posted by Chris Ammerman on Stack Overflow See other posts from Stack Overflow or by Chris Ammerman
Published on 2010-05-18T13:28:28Z Indexed on 2010/05/18 13:30 UTC
Read the original article Hit count: 375

Filed under:
|
|

My scenario consists of the following points.

  • I have a packaged software product I am developing in C#
  • Since it is a packaged product, the public interfaces of the assemblies need to be tightly controlled...
    • All assemblies are strong-named
    • Any classes that don't absolutely have to be "public" are "internal"
  • I want to write unit tests for those "internal" classes, since they are the bulk of the code

And finally.... I want to try writing the unit tests in Ruby.

Since the unit tests would be external to the assembly containing the code under test, the assemblies under test would each need to have an "InternalsVisibleTo" attribute specifying the name of the unit test assembly. Which of course would mean that the Ruby unit tests would have to compile down to a .NET assembly so they can be given access in this way.

Can this be done? If so, how? All I can find on the web about "compiling IronRuby" is about building the actual IronRuby runtime from source.

© Stack Overflow or respective owner

Related posts about ironruby

Related posts about unit-testing