could you just use ".exists?==false" where you have ".exists?"
On Jun 5, 1:19 am, Jerry Lane <[email protected]> wrote: > I have the following now: > > assert(@@ie.div(:class, "ext-el-mask-msg x-mask-loading").exists?,"Test > passes as 'Loading...' is not present on screen") > > This prints when the assert is true but in reality I want it to print when > the assert is false. When it is false the test fails when in reality it is > the opposite fails. Is there anyway to revert the assert so that it will > fail when true? Even thou I can change the messaging I feel it will be > confusing for someone to see 'Failed' as a test result regardless of the > text printed to the screen. > > 2009/6/3 aidy lewis <[email protected]> > > > > > > > > > 2009/6/3 Jerry Lane <[email protected]>: > > > Can I just use a simple if to do that thou? Something simple such as > > > > if boolean = true > > > puts 'Test Passed' > > > else > > > puts 'Test Failed' > > > end > > > xUnit saves you from writing your own assertions (as above). Although > > I believe it to be of the wrong narrative for business facing tests. > > > Look at: > > >http://github.com/aslakhellesoy/cucumber/tree/9606fe835c84ed56ff5c417... > > > Aidy > > -- > Jerry- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
