# Code Review: netinterop1

**URL:** <https://www.ruby-forum.com/t/code-review-netinterop1/158692>\
**Category:** IronRuby\
**Created:** [January 26, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692 "2009-01-26T22:10:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 26, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/1 "2009-01-26T22:10:28Z")

</div>

tfpt review “/shelveset:netinterop1;REDMOND\jdeville”  
Comment :  
More tests for .net interop. This is taking advantage of the IronRuby  
selfhosting that Tomas blogged about in order to maintain isolation as I  
run different styles of requiring files. If you add  
Merlin/External/Languages/IronRuby/mspec/mspec/bin to your path, you  
should be able to run these with “mspec -fs /path/to/Interop/Load”

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 26, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/2 "2009-01-26T23:31:27Z")

</div>

On Mon, Jan 26, 2009 at 1:03 PM, Jim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> tfpt review “/shelveset:netinterop1;REDMOND\jdeville”  
> Comment :  
> More tests for .net interop. This is taking advantage of the IronRuby selfhosting that Tomas blogged about in order to maintain

Where can I find Tomas’ blog? I’d like to subscribe but I didn’t see  
it on the IronRuby “people” page:

[http://ironruby.net/About/People](http://ironruby.net/About/People)

Justin

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 26, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/3 "2009-01-26T23:33:48Z")

</div>

The best way to answer your own question - post to a mailing list! I  
found a nice blogroll post by Oleg:

[The Microsoft Dynamic Languages Team Blogroll - Signs on the Sand](http://www.tkachenko.com/blog/archives/000747.html)

Maybe someone can update the people page? I would but I haven’t  
created an account and am pressed for time as it is …

Justin

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 31, 2009, 8:05am UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/4 "2009-01-31T08:05:49Z")

</div>

Srivatsn,

Can you take a look?

JD

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 27, 2009, 12:08am UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/5 "2009-01-27T00:08:26Z")

</div>

Fixed 🙂

Tomas

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [February 4, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/6 "2009-02-04T23:25:03Z")

</div>

Sorry about the delay on this. Here are my comments:

1. Does MSpec have shared behaviors, like Rake or Bacon? If so, you  
should try to remove the duplication of managing engines and whatnot  
that you have in before/after blocks. For example:

shared “.NET Test” do  
before { @engine = IronRuby.create\_engine }  
after { @engine = nil }  
end

describe “Midifying and reloading a .NET BCL Assembly” do  
behaves\_like “.NET Test”  
end

1. There’s a lot of duplication in the “Repeated loading of a .NET BCL  
assembly with Strong name”, and examples like that, so can you do  
something like this:

it “only loads once with require followed by require” do  
[true, false].each do |t|  
@engine.execute(“require ‘System.Core, Version=3.5.0.0,  
Culture=neutral, PublicKeyToken=b77a5c561934e089’”).should == t  
end  
end

or where the loading mechanism changes

it “loads twice with load followed by load\_assembly” do  
[‘load’, ‘load\_assembly’].each do |t|  
@engine.execute("#{t} ‘System.Core, Version=3.5.0.0,  
Culture=neutral, PublicKeyToken=b77a5c561934e089’").should == true  
end  
end

Otherwise, it’s a great start!

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [February 6, 2009, 3:18am UTC](https://www.ruby-forum.com/t/code-review-netinterop1/158692/7 "2009-02-06T03:18:27Z")

</div>

Updated shelveset, and diff.

JD
