[rspec-users] Good practices on spec'ing views?
zach.dennis at gmail.com
Wed May 5 14:23:44 EDT 2010
On Fri, Apr 30, 2010 at 4: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?
Before Cucumber came onto the scene view specs were a lot more prevalent and
relevant. Cucumber does an excellent job of allowing us to drive the
implementation the views based on what our scenarios need. When Cucumber is
not being used, I find view specs do offer a benefit, but when using
Cucumber, I find that takes the cake to driving the view implementation.
These days, I always use Cucumber though, so it's been a while since I've
written view specs.
In The Rspec Book, section 24.6 (chapter 24), "When I write view specs"
offers some tips for determining when to write view specs. Have you read
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users