I'm trying to get full specing of my views, which involve calling  
some Scriptaculous helpers in the views themselves. For instance, I  
have a div containing a bunch of thumbnails which I'm going to make  
sortable with sortable_element. I'm trying to figure out a good way  
to write a spec for this type of call. so far the closest I have  
gotten is to write something like

response.should have_text Regexp.new('Sortable.create\ 
("gallery_1_thumbnails"')

Which works, but seems a bit ugly (and could possibly break if  
Scriptaculous changed. It just seems a little too "hard coded". Is  
there a better way?


Thanks,
Leslie
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to