# IronRuby and RSpec

**URL:** <https://www.ruby-forum.com/t/ironruby-and-rspec/166584>\
**Category:** IronRuby\
**Created:** [April 27, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/ironruby-and-rspec/166584 "2009-04-27T16:36:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devbanana](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Post date:** [April 27, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/ironruby-and-rspec/166584/1 "2009-04-27T16:36:50Z")

</div>

Hi,

I’m having trouble running IronRuby with RSpec. I have a simple file  
just to  
test.

The last require statement is loading the .NET assembly from my project,  
but  
it’s not actually used in this example.

require ‘rubygems’  
require ‘spec’  
require ‘mscorlib’  
require File.expand\_path(File.join(%w{… bin x86 Debug FlightShooter}),  
File.dirname( **FILE** ))

describe ‘Test’ do  
it “should do something” do  
‘hello’.should == ‘hello’  
end  
end

The error I get is:

> ir spec\test\_spec.rb  
> IronRuby.Libraries:0:in `ExpandPath': Invalid argument - test_spec.rb:0 (Errno::EINVAL) from :0:in `expand\_path’  
> from example\_group\_methods.rb:103:in `set_description' from example_group_methods.rb:166:in `subclass’  
> from example\_group\_methods.rb:43:in `describe' from example_group_factory.rb:25:in `create\_example\_group’  
> from main.rb:24:in `describe’  
> from test\_spec.rb:0

Any idea what could be going wrong?

Thanks,  
Brandon

> **[Coming Soon](https://perpetualseeker.com/)**
>
> Something great is coming.

Blog about college, programming, and other random things.  
Follow me on Twitter: [http://twitter.com/devbanana](http://twitter.com/devbanana)

---

<div class="post-metadata">

**Author:** ![devbanana](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Post date:** [April 27, 2009, 5:45pm UTC](https://www.ruby-forum.com/t/ironruby-and-rspec/166584/2 "2009-04-27T17:45:37Z")

</div>

I think this is an issue with the current build which presents RSpec  
from working.

Take a look at my article on

> **[.NET Interop - Getting Started With IronRuby And RSpec, Part 1](https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/february/net-interop-getting-started-with-ironruby-and-rspec-part-1)**

I’ve created a build which should fix this bug -  
[Redirecting...](http://blog.benhall.me.uk/downloads/IronRuby/MSDNBuild.zip) - well,  
more of a hack to prove the concept works 🙂

Let me know how you get on.

Ben

On Mon, Apr 27, 2009 at 3:27 PM, Brandon O.
