Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > must "explanation" {.test.} style not working in my unit tests

Reply
Thread Tools

must "explanation" {.test.} style not working in my unit tests

 
 
Vahagn Hayrapetyan
Guest
Posts: n/a
 
      04-29-2011
Hi, I'm trying to use this extension:

https://github.com/sandal/rbp/blob/m..._extensions.rb

in my unit tests, as explained here:

http://answers.oreilly.com/topic/381...more-readable/

My unit tests won't recognize this syntax however:

undefined method `must' for StackTest:Class (NoMethodError)

Does this have to do with the Ruby version perhaps? I'm using v.
1.9.2p0.

Thanks!

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Vahagn Hayrapetyan
Guest
Posts: n/a
 
      04-30-2011
Ping...

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
serialhex
Guest
Posts: n/a
 
      04-30-2011
[Note: parts of this message were removed to make it a legal post.]

On Fri, Apr 29, 2011 at 3:19 PM, Vahagn Hayrapetyan <(E-Mail Removed)>wrote:

> Hi, I'm trying to use this extension:
>
> https://github.com/sandal/rbp/blob/m..._extensions.rb
>
>

are you including that code at the top of your test file? or at least having
a "test_helper.rb" file you require into your tests?? i've used this syntax
before but not extensively, so i dont know how much help i will be.
hex

 
Reply With Quote
 
Vahagn Hayrapetyan
Guest
Posts: n/a
 
      05-02-2011
@Chad: cheers!

@serialhex:

>or at least having a "test_helper.rb" file you require into your tests??


I wasn't doing that since I had the impression (from reading about this
syntax) that this method was integrated into Test::Unit, so one could
just use it "out of the box". Apparently I was wrong - I've pasted it
into a helper file and required it and now it's working.

Thanks! V.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to interrupt unit tests if a library is not present. Diana Jaunzeikare Ruby 6 06-30-2009 05:40 PM
Why must and must not be "final" ? NeoGeoSNK Java 25 11-24-2006 02:02 AM
Junit tests, setting up tests without having to create a billion methods xyzzy12@hotmail.com Java 8 02-28-2006 08:59 PM
Tests without study guides or practice tests? =?Utf-8?B?Q2hyaXNS?= Microsoft Certification 8 12-20-2005 04:59 AM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM



Advertisments