# Re: rake test

**URL:** <https://www.ruby-forum.com/t/re-rake-test/137555>\
**Category:** IronRuby\
**Created:** [May 14, 2008, 6:42am UTC](https://www.ruby-forum.com/t/re-rake-test/137555 "2008-05-14T06:42:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [May 14, 2008, 6:42am UTC](https://www.ruby-forum.com/t/re-rake-test/137555/1 "2008-05-14T06:42:01Z")

</div>

In one of my rake test I ran into the same problem. It looks like one of  
the method was getting a null value even though the method signature  
hadÂ Â [NotNull] with /_!_/.Â I added a code if the value is null return  
false and my rake test went through. ItÂ happened for all but one test  
soÂ I am ok for now. It looks like it is not happening when you execute  
the same command in ir so I think it is specific to rake. I doubt, it  
has to do with ‘:each’ in the teardown part of the rake test.  
Thanks.

----- Original Message ----  
From: Andrew P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Tuesday, May 13, 2008 11:09:31 PM  
Subject: [Ironruby-core] rake test

Should I be able to run these?

I’m currently getting this error:

:0:in `do_generate': undefined local variable or method `methods’ for  
main:Object (NoMethodError)  
Â Â Â Â Â Â Â from :0:in `#block162' Â Â Â Â Â Â Â from c:\Projects\IronRuby\trunk\src\IronRuby.Libraries\Extensions\IListOps.cs:785:in `Each’  
Â Â Â Â Â Â Â from :0:in `Initialize##1’rake aborted!  
Command failed with status (1):  
["c:\projects\ironruby\trunk\build\debug\ir…]

Cheers,

Andrew.

---

<div class="post-metadata">

**Author:** ![ksunair](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b19c9b/32.png) [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Post date:** [May 14, 2008, 7:15am UTC](https://www.ruby-forum.com/t/re-rake-test/137555/2 "2008-05-14T07:15:32Z")

</div>

How does the method signature with [NotNull] look like? (Note that /_!_/  
is just a comment that is understood by static verification tools, not  
used at runtime at all, the [NotNull] attribute should prevent null to  
go in if called from Ruby, however).

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Unnikrishnan  
Nair  
Sent: Tuesday, May 13, 2008 9:41 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] rake test

In one of my rake test I ran into the same problem. It looks like one of  
the method was getting a null value even though the method signature had  
[NotNull] with /_!_/. I added a code if the value is null return false  
and my rake test went through. It happened for all but one test so I am  
ok for now. It looks like it is not happening when you execute the same  
command in ir so I think it is specific to rake. I doubt, it has to do  
with ‘:each’ in the teardown part of the rake test.

Thanks.

----- Original Message ----  
From: Andrew P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Tuesday, May 13, 2008 11:09:31 PM  
Subject: [Ironruby-core] rake test

Should I be able to run these?

I’m currently getting this error:

:0:in `do_generate': undefined local variable or method `methods’ for  
main:Object (NoMethodError)  
from :0:in `#block162' from c:\Projects\IronRuby\trunk\src\IronRuby.Libraries\Extensions\IListOps.cs:785:in `Each’  
from :0:in `Initialize##1’rake aborted!  
Command failed with status (1):  
["c:\projects\ironruby\trunk\build\debug\ir…]

Cheers,

Andrew.
