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

Brandon Olivares programmer2188 at gmail.com
Sat Apr 4 02:14:22 EDT 2009


I just found a custom matcher created by Phlip at

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 somewhere else?

So I wondered if there is a way to get around this, since I'd like to test
that my select field is there.

      it "should have a subject dropdown box" do
          response.body.should be_html_with {
            form :id => 'contact' do
              label 'Subject'
              select :id => 'subject'
      end # it "should have a subject dropdown box"


More information about the rspec-users mailing list