[rspec-users] Ordering in view specs using have_tag and with_tag

David Chelimsky dchelimsky at gmail.com
Mon May 21 20:27:45 EDT 2007


On 5/21/07, Wincent Colaiuta <win at wincent.com> wrote:
> El 22/5/2007, a las 2:01, David Chelimsky escribió:
>
> > Not to pass the buck ... but I'm going to pass the buck on this one.
> > have_tag and with_tag wrap assert_select, which ships with Rails. I've
> > actually submitted a couple of patches to assert_select to Rails
> > myself because I'd like to see better error messages and more rjs
> > coverage. I'd encourage you to make this request and/or submit a patch
> > to Rails directly as well.
>
> Ok, thanks for the advice, David. I've submitted a request ticket:
>
> http://dev.rubyonrails.org/ticket/8428
>
> If you have any insight onto what such a patch might involve, please
> let me know. I don't know enough about Rails internals to work
> something up yet, but perhaps with some help I might be able to get
> at least a basic prototype working at some point.

You don't have to know too much about Rails internals. assert_select
is nicely decoupled from most of it. You will have to put on your
regexp fu.

Take a look at actionpack/test/controller/selector_assertions.rb and
actionpack/lib/action_controller/assertions/selector_assertions.rb.

Cheers,
David


>
> Cheers,
> Wincent
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list