# AutoSpec exits after executing

**URL:** <https://www.ruby-forum.com/t/autospec-exits-after-executing/181837>\
**Category:** IronRuby\
**Created:** [January 19, 2010, 2:23am UTC](https://www.ruby-forum.com/t/autospec-exits-after-executing/181837 "2010-01-19T02:23:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benhiller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Post date:** [January 19, 2010, 2:23am UTC](https://www.ruby-forum.com/t/autospec-exits-after-executing/181837/1 "2010-01-19T02:23:59Z")

</div>

Hello,

I’ve been trying to get AutoSpec to work again.

I execute it using the following command:  
pretty:Kona Ben$ ir autospec

However, it just exits.

Any ideas why?

Thanks

Ben

---

<div class="post-metadata">

**Author:** ![benhiller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Post date:** [January 20, 2010, 11:22am UTC](https://www.ruby-forum.com/t/autospec-exits-after-executing/181837/2 "2010-01-20T11:22:25Z")

</div>

> Thanks
> 
> Ben

So after doing this:

> igem install ZenTest  
> cd C:\ironruby\lib\ironruby\gems\1.8\gems\ZenTest-4.1.4  
> ir -Ilib bin\autospec

Autospec tries to execute this command:

C:\ironruby\bin\ir.exe -I.;lib;test:../../minitest/dev/lib -rubygems -e  
“%w[minitest/autorun test/test\_focus.rb test/test\_autotest.rb  
test/test\_zentest\_mapping.rb test/test\_unit\_diff.rb  
test/test\_zentest.rb].each { |f| require f }” | unit\_diff -u

The problem is unit\_diff will fail to load, since there is no  
unit\_diff.bat or something like that on the path. To get past that I  
just commented out the unit\_diff part of lib/autospec.rb#422. However,  
it still quits, though the command that is generated does run on its  
own.

It quits because IronRuby doesn’t support the call to open it is using  
(open with a “|”), and they are swallowing the error msg. Here’s a  
smaller repro:

> > > open(“| ir.exe -e "puts ‘hi’"”, ‘r’)  
> > > :0:in `open': Exception of type 'IronRuby.Builtins.NotImplementedError' was thrown. (NotImplementedError) from :0:in `open’  
> > > from (ir):1

Tomas, is there any work-around to this? … reading a process like a  
file, character by character?

To get autotest working right now, you can replace the entire open(){}  
call in lib/autotest.rb#243 with simply this:

```
  puts `#{cmd}`

```

It won’t print out the test results as they happen, but it’ll at least  
show the results when done, and rerun the tests when you change  
something.

~Jimmy

---

<div class="post-metadata">

**Author:** ![benhiller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Post date:** [January 20, 2010, 10:54pm UTC](https://www.ruby-forum.com/t/autospec-exits-after-executing/181837/3 "2010-01-20T22:54:15Z")

</div>

open with a “|” seems to be the same as popen/popen3. We support both of  
those, so it should not be too hard to support open with a “|”. Could  
even be written in Ruby code building on top of popen/popen3 (if you  
want a workaround right away).
