[Ironruby-core] Code Review: netinterop1

Jim Deville jdeville at microsoft.com
Thu Feb 5 19:49:47 EST 2009


Updated shelveset, and diff.

JD

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi
Sent: Wednesday, February 04, 2009 2:02 PM
To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers; Srivatsn Narayanan
Subject: Re: [Ironruby-core] Code Review: netinterop1

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

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

> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-
> bounces at rubyforge.org] On Behalf Of Jim Deville
> Sent: Friday, January 30, 2009 10:20 PM
> To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers;
> Srivatsn Narayanan
> Subject: Re: [Ironruby-core] Code Review: netinterop1
> 
> Srivatsn,
> 
> Can you take a look?
> 
> JD
> 
> > -----Original Message-----
> > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-
> > bounces at rubyforge.org] On Behalf Of Jim Deville
> > Sent: Monday, January 26, 2009 1:03 PM
> > To: IronRuby External Code Reviewers; Srivatsn Narayanan
> > Cc: ironruby-core at rubyforge.org
> > Subject: [Ironruby-core] Code Review: netinterop1
> >
> >   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"
> >
> 
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

-------------- next part --------------
A non-text attachment was scrubbed...
Name: netinterop1.diff
Type: application/octet-stream
Size: 17906 bytes
Desc: netinterop1.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090205/0f59aac0/attachment.obj>


More information about the Ironruby-core mailing list