Here's my take as just a happy user of stories...  First, I say definitely
use WebRat.  WebRat is a large part of what convinced me to use stories in
the first place.  I was looking for both something that simulated real
usage, as well as something that wasn't so fragile/affected by changes in
implementation (for the latter, this is stories vs. view and controller
specs).
At this point, I have a large set of unit specs, helper specs, and large
number of stories, and then very little controller and view specs.  I am
quite sold on this approach.  I find writing the stories to be a much better
way to test my views and controllers, because it's testing them in the same
way they'd truly be used by a user, as opposed to what at least feels like
to me, an insider knowledge way of testing (ya ya, I know, test against the
API and so on, but go look at most controller tests and such, they just
don't feel as parallel to reality).

Anyway, all that wouldn't really be possible without WebRat, IMHO.  You can
also pursue Selenium, but that was just too much for me at this point.  We
are getting into more JavaScript in our app, so I may bring Selenium in in
the future, but we'll see.

As for Cucumber, this looks promising, but I haven't personally tried it out
yet.  Here's one writeup I saw on it:
http://upstream-berlin.com/2008/08/26/cucumber-next-generation-rspec-story-runner/
I've already done all the rake tasks I need, and set it all up to work quite
nicely with CruiseControl.rb, so some of the advantage is diminished.  Plus,
I haven't been certain it's ready for prime time use, or enough of an
advantage to disturb a system that's already working well, but others here
can comment better on Cucumber...

On Mon, Sep 8, 2008 at 9:42 PM, DyingToLearn <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Here is the short version of my question:
> For stories, is webrat the way to go? How many of you use  webrat? How
> many don't?
>
> Here is the long version:
> I have been writing specs for some time now. I have noticed that once
> I learned how to write specs (both the syntax and the techniques) it
> made my development much faster and more reliable. However, while I
> was learning my development was painfully slow. So far it seems to be
> the same with stories.
>
> >From the recent posts I've seen on this mailing list, it looks like I
> should focus my efforts on learning cucumber instead of the built-in
> story runner. It is mostly compatible with what is already in RSpec,
> and it has some good extra features. Do you generally agree with that?
>
> What I am confused about, is whether or not I should learn webrat. It
> looks great in theory, and I've see it mentioned a few times. But I
> haven't seen a wide-spread move towards it. On top of that, the first
> time I looked at it I got rather confused.
>
> The reason I ask (instead of just trying it for myself) is that I'm
> the only developer on most of the projects I work on, so I can't
> afford a huge drop in productivity. And if my efforts learning to
> write specs are much of a guideline, it will probably take me 3-4
> weeks to get comfortable with writing stories.
>
> I know I need to learn this, so I want to focus my efforts where I
> will get the most return on my time.
>
> Thanks
>
> PS. I am REALLY looking forward to the RSpec book!
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Christopher Bailey
Cobalt Edge LLC
http://cobaltedge.com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to