# Did Something Changed Again in Spec

**URL:** <https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254>\
**Category:** IronRuby\
**Created:** [January 25, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254 "2010-01-25T17:56:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/1 "2010-01-25T17:56:17Z")

</div>

I am trying to unit test my .NET CLR assembly using IronRuby spec  
framework. First, the following command does not work anymore

igem install spec

Now, I have to type the following:

igem install rspec

Anyway, when I run the following script:

require ‘rubygems’  
require ‘spec’

require File.dirname( **FILE** ) + ‘/bin/Debug/EStudy.Domain.Model.dll’

include EStudy.Domain.Model.Model

user = User.new

describe User, “when user is created” do

it “should not be null” do

```
user.should == null

```

end

end

I get the following error:

C:\Projects\EStudyVS2008\EStudySoltution\EStudy\ConsoleApplication2\>spec  
test\_us  
er.rb --format nested  
./bin/Debug/EStudy.Domain.Model.dll: 127: The specified procedure could  
not be f  
ound. - Init\_EStudy (LoadError)  
./bin/Debug/EStudy.Domain.Model.dll from  
c:/ruby/lib/ruby/site\_ruby/1.8/ruby  
gems/custom\_require.rb:31:in `require' from ./test_user.rb:5 from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_ group_runner.rb:15:in`load’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example\_  
group\_runner.rb:15:in `load_files' from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_ group_runner.rb:14:in`each’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example\_  
group\_runner.rb:14:in `load_files' from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/options. rb:133:in`run\_examples’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/command\_  
line.rb:9:in `run' from c:/ruby/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5 from c:/ruby/bin/spec:19:in`load’  
from c:/ruby/bin/spec:19

Any ideas! I am using the exactly the same code I used before. Before I  
used it on IronRuby 0.9 version and now I am using IronRuby RC.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:04pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/2 "2010-01-25T18:04:40Z")

</div>

Igem install spec never worked. It’s always been igem install rspec. And  
before you complain about the confusion, that is the RSpec project’s  
(rspec.info) choice, not ours.

It also looks like when you run spec, you are running the Ruby version,  
not the IronRuby version.

JD

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/3 "2010-01-25T18:06:26Z")

</div>

I did ran igem install spec and it worked fine in IR 0.9. Anyway, how  
should I make it work with IronRuby and not Ruby. Does this mean I have  
to alter the ENV path AGAIN!

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/4 "2010-01-25T18:11:41Z")

</div>

the command you want is ispec

or you’re mixing the gems from your MRI install in which case I’d say  
don’t  
do that nastiness follows.

* * *

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/5 "2010-01-25T18:13:27Z")

</div>

man! changing the PATH variable isn’t needed

it never worked the way you say.

> **[Creating launcher scripts for IronRuby - Ivan Porto Carrero](http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/)**
>
> Search form Recent Posts Scalatra 2.2 released Json4s: One AST to rule them all. Typeclass based databinding for scalatra searchable sbt wiki work …

follow that for the spec and spec.bat file

* * *

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
GSM: +32.486.787.582  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/6 "2010-01-25T18:18:59Z")

</div>

The problem is that my command line does not recognize ispec or rspec or  
mspec. it only recognize spec which is basically ruby framework and not  
ironruby.

Previously with IronRuby 0.9 I used the following command:

spec test\_prime.rb --format nested

and it worked.

Now, when I use spec it executes the ruby framework spec and not  
ironruby.

In 0.9 I had to adjust environment variables so that IronRuby spec  
command can be executed from anywhere.

Here is my article on that:

[http://www.highoncoding.com/Articles/585\_Unit\_Testing\_CLR\_Assembly\_Using\_IronRuby\_with\_Spec.aspx](http://www.highoncoding.com/Articles/585_Unit_Testing_CLR_Assembly_Using_IronRuby_with_Spec.aspx)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/7 "2010-01-25T18:24:34Z")

</div>

there is mspec, rspec, bacon, …

Ironruby uses mspec

The rest of the world (that means just about anything that isn’t a ruby  
implementation) uses rspec, shoulda, bacon, test-unit, test-spec, …

## All you need to do to run the specs for ironruby is that you have to execute dev.bat but I thought we worked out last time that this is probably not the best idea, because it’s confusing if you’re not used to working in the console and with the environment variables.

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/8 "2010-01-25T18:26:20Z")

</div>

For gems:  
Mspec is a simplified version of rspec for testing Ruby implementations.  
You shouldn’t be using it unless you are testing a Ruby implementation.  
Spec does not exist. I don’t know how you installed it before, but it  
doesn’t exist. It is the name of the library that rspec installs  
Rspec is the BDD framework for Ruby that you appear to be looking for.

JD

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:12pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/9 "2010-01-25T18:12:32Z")

</div>

There is mspec, spec, rspec…

In order to run IronRuby specification framework do I have to use rspec.  
Also, I think I have to set the ENVIRONMENT variables again for this to  
work right??

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/10 "2010-01-25T18:31:31Z")

</div>

I don’t like to execute dev.bat each time I need to work with IronRuby.  
Why can’t it just work out of the box like PowerShell.

This is a big defect in the IronRuby. Too many configurations will scare  
developers away. People are not interested in setting paths in ENV  
variables, performing configuration settings in App.config to make sure  
that IronRuby is pointing to correct lib paths.

Not many people are willing to try out IronRuby because of configuration  
issues.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/11 "2010-01-25T18:36:39Z")

</div>

Does that mean I have to go to the following folder:

C:\DevTools\ironruby-1.0-rc1\lib\ironruby\gems\1.8\gems\rspec-1.3.0\bin

and copy the files into the

C:\DevTools\ironruby-1.0-rc1\bin

folder?

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:41pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/12 "2010-01-25T18:41:39Z")

</div>

I guess there is no point doing all of this since IronRuby does not  
support rCov for code coverage for the .NET CLR assemblies.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:41pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/13 "2010-01-25T18:41:34Z")

</div>

Mohammed listen,

If you just extract the ironruby.zip to c:\ironruby and add  
C:\ironruby\bin  
to your PATH you’re good to go. always, everywhere.

You’re making it out to be harder than it is.

I wrote this earlier but will do it again:  
You do igem install rspec  
when that completes

copy C:\ironruby\lib\ironruby\gems\bin\spec C:\ironruby\bin\ispec  
copy C:\ironruby\lib\ironruby\gems\bin\spec.bat  
C:\ironruby\bin\ispec.bat

now you’re good to go.  
That wasn’t hard was it.

Now my advice to you is:

- read a book on shell/batch scripting
- first check if the problem isn’t PEBKAC/user error/…
- use google
- learn properly about ruby and it’s ecosystem and more importantly the  
way  
it works (the secret it’s file based). As it so happens we sell training  
so  
feel free to hire us ([http://whiterabbitconsulting.eu](http://whiterabbitconsulting.eu)).
- do stuff in piecemeal. start with the most simple thing you can think  
off
- build your own gem so you know how it works
- …

Did I mention don’t badmouth stuff if the real problem is ignorance.

* * *

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
GSM: +32.486.787.582  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/14 "2010-01-25T18:44:29Z")

</div>

As we’ve talked about before, you only need dev.bat if you are  
developing IronRuby. If you are developing with IronRuby, you only need  
to use the installer. If you are embedding IronRuby, then there are  
app.config issues that need to be worked out, some of those can be  
handled by better tooling down the road, some of those can’t be helped.  
Even those that can’t be helped have alternate API’s.

JD

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:45pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/15 "2010-01-25T18:45:40Z")

</div>

Feel free to port rCov to IronRuby to support a) the subset of rCov  
written in C. b) adding integration for .NET profiling.

JD

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/16 "2010-01-25T18:44:08Z")

</div>

OKay let’s do this step by step. I am failing on step ONE!

C:\Projects\EStudyVS2008\EStudySoltution\EStudy\ConsoleApplication2\>igem  
install  
rspec  
ERROR: While executing gem … (RangeError)  
bignum too big to convert into Fixnum

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/17 "2010-01-25T18:46:15Z")

</div>

What version of IronRuby?

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 7:02pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/18 "2010-01-25T19:02:58Z")

</div>

Okay that worked out but I am still not comfortable copying files and  
renaming them to batch files and putting them in the bin directory of  
the IronRuby folder. Also switching back and forth between the dev.bat  
and console. Also, cmd console is not able to find dev.bat from anywhere  
so I have to manually execute it from the folder that contains dev.bat.

I am willing to learn IronRuby and spend countless hours using this cool  
dynamic language. But I am afraid people are just going to GIVE UP  
trying to solve these configuration issues. Setting paths, copying and  
renaming their batch files to ispec whatever…

I am not trying to put down IronRuby but sorry this is not going to work  
in the real world.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 7:07pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/19 "2010-01-25T19:07:54Z")

</div>

Why are you using dev.bat? Are you developing IronRuby? If not, don’t  
use  
it. It’s unnecessary unless you are working on or debugging IronRuby.

Ryan R.

Email: removed\_email\_address@domain.invalid  
LinkedIn: [http://www.linkedin.com/in/ryanriley](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 7:07pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/20 "2010-01-25T19:07:54Z")

</div>

this will change soon when you can do

## ir -S spec spec/\*\*/\*\_spec.rb

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))

[Next page](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254.md?page=2)
