[rspec-users] custom, nested HTML matchers in RSpec

David Chelimsky dchelimsky at gmail.com
Mon Mar 9 19:56:03 EDT 2009

On Mon, Mar 9, 2009 at 6:20 PM, Phlip <phlip2005 at gmail.com> wrote:
>> http://gist.github.com/76136
>>    response.body.should be_html_with{
>>      form :action => '/users' do
>>        fieldset do
>>          legend 'Personal Information'
>>          label 'First name'
>>          input :type => 'text', :name => 'user[first_name]'
>>        end
>>      end
>>    }
> Has anyone tried this? is it useful?

I haven't tried it yet, but it does seem very useful. The project I'm
focused on right now is all json all the time, so I don't personally
have a real world case for this at the moment. Anybody doing an app w/
html views willing to try this out?

More information about the rspec-users mailing list