Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-05 Thread Phlip
Brandon Olivares wrote: Is there any documentation of the rest of assert2? I found a web site I think (assuming it's the same thing), but there wasn't really documentation for assert_xhtml or assert_rjs. assert_rjs is still in the oven, and assert_xhtml arrived too fast to get anything more t

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-05 Thread Brandon Olivares
..@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Phlip > Sent: Sunday, April 05, 2009 12:09 AM > To: rspec-users@rubyforge.org > Subject: Re: [rspec-users] Phlip's be_html_with was RE: Problem with > Custom matcher and Blocks > > Brandon Olivares wrote: &g

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: I'd appreciate it if you could let me know about the be_html_with issue when you can though, as I like the natural language better. Add this monkey patch below require 'assert2/xhtml': class BeHtmlWith def matches?(stwing, &block) @block ||= block @scope.wrap

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: Yes that's great! That works perfectly. I'd appreciate it if you could let me know about the be_html_with issue when you can though, as I like the natural language better. i dunno about "natural language", but I expect to fix the RSpec language this weekend. (-; ___

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
rg [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Phlip > Sent: Saturday, April 04, 2009 1:46 PM > To: rspec-users@rubyforge.org > Subject: Re: [rspec-users] Phlip's be_html_with was RE: Problem with > Custom matcher and Blocks > > Brandon Olivares wrote: >

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: it "should have a name field" do response.body.should be_html_with { form.contact! do label 'Name' input.name! end } end # it "should have a name field" There is most definitely not a name field, nor

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
orge.org] On Behalf Of Phlip > Sent: Saturday, April 04, 2009 8:40 AM > To: rspec-users@rubyforge.org > Subject: Re: [rspec-users] Phlip's be_html_with was RE: Problem with > Custom matcher and Blocks > > Brandon Olivares wrote: > > > I just found a custom m

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
using AJAX. Thanks, Brandon > -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Phlip > Sent: Saturday, April 04, 2009 8:40 AM > To: rspec-users@rubyforge.org > Subject: Re: [rspec-users] Phlip's

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: I just found a custom matcher created by Phlip at http://gist.github.com/76136 That's just a sketch. The real deal is at... gem install nokogiri assert2 require 'assert2/xhtml' Report if that works better. You might find its inside source code is a little nicer,

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Uh oh. select! :id => 'subject' select!.subject! ! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
Hi, I just found a custom matcher created by Phlip at http://gist.github.com/76136 So I added that to my project, and it mostly works great for what I'm trying to do, and the syntax is pretty nice. But anytime I try to use select, I get an error. I wonder if it's conflicting with another method