[rspec-users] Good practices on spec'ing views?
adam.sroka at gmail.com
Fri May 21 15:44:09 EDT 2010
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
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 <stefan.kanev at gmail.com> 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?
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users