[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Overloading class behavior in a test case.

Jim Van Fleet

5/18/2005 1:00:00 AM

I have a question about overriding class behavior from within a test
case context. Trying both methods below seems to indicate that neither
can access the class level methods of the class under test. None of
them are protected access.

What am I doing wrong?

http://rafb.net/paste/results/CVO...
http://rafb.net/paste/results/OtS...

Cheers,

Jim


2 Answers

Pit Capitain

5/18/2005 5:01:00 AM

0

Jim Van Fleet schrieb:
> I have a question about overriding class behavior from within a test
> case context. Trying both methods below seems to indicate that neither
> can access the class level methods of the class under test. None of
> them are protected access.
>
> What am I doing wrong?
>
> http://rafb.net/paste/results/CVO...
> http://rafb.net/paste/results/OtS...

Hi Jim,

can you show us where you try to call those "class level methods" and
what the output looks like? I couldn't find it in your code samples.

Regards,
Pit


Jim Van Fleet

5/18/2005 1:26:00 PM

0

>
> Hi Jim,
>
> can you show us where you try to call those "class level methods" and
> what the output looks like? I couldn't find it in your code samples.

It's called from within the original class like so:

http://rafb.net/paste/results/FYs...

I bet it would work if I changed the syntax of those calls to class
level, but is there any way to do that without the extra verbosity? It
doesn't feel very ruby-esque.

Thanks,

Jim