Phlip,

Is there any plan to allow for negative assertions (e.g., should_not
be_html_with)? I use this in a custom matcher, and can't think of a way to
support negative assertions unless be_html_with does.

I'm of course going by the output of negative_failure_message saying not to
use it that way.

Brandon

> -----Original Message-----
> From: [email protected] [mailto:rubyonrails-
> [email protected]] On Behalf Of Phlip
> Sent: Sunday, April 12, 2009 12:32 PM
> To: [email protected]
> Cc: [email protected]
> Subject: [Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should
> send_js_to
> 
> 
> > assert_no_rjs_ now negates all the JavaScript assertions listed here:
> >
> > http://groups.google.com/group/rubyonrails-
> talk/browse_thread/thread/49fd7c9b9107d577
> 
> > (Sorry - no .should not_send_js_to yet..;)
> 
> Version 0.5.1 fixes that: .should_not send_js_to
> 
> Next, assert_xhtml (and .should be_html_with) add the any! keyword:
> 
>      assert_xhtml do
>        ul.kalika do
>          any! 'Billings report'
>        end
>      end
> 
> It evaluates to the XPath * operator, so the above passes if any
> element below
> the <ul class='kalika'> contains any "Billings report".
> 
> This example fails if "Billings report" appears anywhere in the
> document
> (assuming we _reeally_ don't like it!;):
> 
>      assert_xhtml do
>        without!{ any! /Billings report/ }
>      end
> 
> If anyone can think of new features to add to (or take out of) these
> DSLs,
> I'm all ears!
> 
> --
>    Quark
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to