I test dynamic behavior in views using a combination of RSpec, Watir, and Jasmine. I don't test the structure of the view. I keep the structure simple and keep client side behavior mostly in client side code (i.e. javascript.)
RSpec + Watir + jasmine is a heavy set of testing tools, but that is because most of the heavy lifting in modern web apps is in the browser. I want to make sure that it can't break. I keep it from getting too big or too slow by eliminating interactions with the server by mocking/stubbing Ajax calls. On Fri, Apr 30, 2010 at 1:26 AM, Stefan Kanev <[email protected]> wrote: > Hey guys. > I've been doing RSpec for more than a year by now, yet I cannot help but > feel that I've never got a single view spec right. I can see that I have > very few view specs and that my views tend be a lot messier than everything > else. I've read the chapter in the RSpec book about spec'ing views, but I > still think I'm not getting it right. > Assuming that I'm a view spec noob, would you guys care to share your > experience with writing them? What works and what doesn't? What should I > avoid at all cost? And most importantly, how does the process of writing > view specs feel? > Thanks, > Stefan > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
