[rspec-users] Integration Specs On Rails

Bryan Helmkamp bryan at brynary.com
Sun Apr 8 01:35:29 EDT 2007

On 4/7/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> There's an open RFE for this
> http://rubyforge.org/tracker/index.php?func=detail&aid=9381&group_id=797&atid=3152.
> Just a matter of priority. If somebody wants to take a stab at a
> patch, that might move it up.

I guess it's worth asking if what we are talking about should be
termed "integration" specs or "acceptance" specs.

In my current RSpec project, we use a spec/integration directory for
specs that cover specific clusters of objects, often with DB access,
but still not at a high level the customer could understand. We
reserve spec/models, spec/controllers, and spec/views for specifying
behavior for those pieces in isolation, with as few DB hits as

A significant issue I see is that Rails' integration specs are not at
as high of a level as I think they should be. I'd like to write
something like:

visit PageA
should click_link("Next page")
should be_on(PageB)

I'm (very slowly) working on a library to support this kind of syntax
in Rails integration specs, but it would be even better to do this
with RSpec.

Bryan Helmkmap
http://brynary.com -- My blog

More information about the rspec-users mailing list