[rspec-devel] ARTS on RSpec on Rails
jake.howerton at gmail.com
Mon Sep 25 11:15:54 EDT 2006
On 9/25/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> I've been playing around w/ this a bit and came up w/ syntax that
> works a little better for all of the different rjs expectations:
> response.should_have_rjs :replace_html, 'replaceable_div', "This goes
> inside the div"
> response.should_have_rjs :sortable, 'sortable_div'
Yes I was playing around with it for a bit this way as well. One
thing that is good about doing it this way is that it is more inline
with the original ARTS API.
However when I was playing with it I just had it written as
response.should_rjs :replace_html, 'replaceable_div', which does not
read very well.... the 'have' in there helps out alot. To me the
ultimate goal would be response.rjs.should_replace_html
'replaceable_div' ..... read aloud as "RJS should replace html in
It doesnt work so well for sortable though now does it. :)
Let me know what you think... either way I am very happy to have this
in RSpec and I suspect there are others who will be as well.
P.S. with your way it can be read nicely as well... "Response should
have RJS (call to) replace_html for 'replaceable_div'
More information about the rspec-devel