Thanks Bret for your help.
I added following two lines to my code in my include section, which is at the begin of my main program:
require 'test/unit/assertions'
include Test::Unit::Assertions
This solved all my assert problems in my code.
Bernd
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bret Pettichord
Sent: Tuesday, March 21, 2006 9:31 PM
To: [email protected]
Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss
Oops.
Put the include statement before the "def" instead of inside it.
On 3/21/06, Paatsch, Bernd <[EMAIL PROTECTED]> wrote:
>
>
> Now I get:
> TEST FAILED.undefined method `include' for
> (WebAC::BPUtils):WebAC::BPUtils
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Bret
> Pettichord
> Sent: Tuesday, March 21, 2006 6:37 PM
> To: [email protected]
> Subject: Re: [Wtr-general] undefined method `add_assertion' for
> nil:NilCla ss
>
>
>
>
> That's what i needed to see. Make this change...
>
> On 3/21/06, Paatsch, Bernd <[EMAIL PROTECTED]> wrote:
> > Still the same after I changed the code to:
> >
> > def bpVerifyPopupWindowOpen( ieCont, verify) #how, what,
> > framename, verify )
> > begin
> include Test::Unit::Assertions
> > assert( ieCont.contains_text( verify) )
> > puts("TEST PASSED. Found test string 'Programming Ruby' ")
> >
> > rescue => e
> > puts("TEST FAILED." + e.message + "\n" +
> > e.backtrace.join("\n"))
> > end
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of
> Bret
> > Pettichord
> > Sent: Tuesday, March 21, 2006 5:46 PM
> > To: [email protected]
> > Subject: Re: [Wtr-general] undefined method `add_assertion' for
> > nil:NilClass
> >
> > On 3/21/06, Paatsch, Bernd <[EMAIL PROTECTED]> wrote:
> > > def
> > > .........some code
> > > begin
> >
> > I suspect your problem is somewhere in here.
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
>
>
> _______________________________________________
>
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
