I prefer to use the form 'msg.should exist' because I feel that it reads better. The error message is a little wordy, but still more communicative than expected true and got false.
/\/\ark > -----Original Message----- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Fedor Fomenko > Sent: Friday, April 10, 2009 4:43 AM > To: rspec-users@rubyforge.org > Subject: Re: [rspec-users] [Cucumber] Bug? > > Thank you for your help. > > I found the problem. My assertion was wrong. I should have used > msg.exists?.should == true since msg.should_not == nil is allways true. > Watir always returns an object which might or might nor have text field. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 3998 (20090409) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > __________ Information from ESET NOD32 Antivirus, version of virus signature database 3999 (20090410) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users