[rspec-users] defining context(s) dynamically

Bryan Helmkamp bhelmkamp at gmail.com
Fri Feb 16 11:40:38 EST 2007

On 2/15/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> What is the value you are looking for by bypassing the convention
> here? I'm asking because perhaps there is a missing feature we can
> tease out of this.


I make use of the :context_type feature to allow me to maintain
separate model unit specs and integration specs. What we term
"integration specs" are specs that test a cluster of models (often
with a fair amount of necessary DB access), not customer-level
acceptance tests (as in the Rails terminology).

We found that in order to make those specs run correctly in database
transactions, we had to add :context_type => :model to their context

Anyway, looks like :context_type is on it's way to being fully
documented, but I figured I'd let you know why we find it useful in
case it might uncover a missing feature.


More information about the rspec-users mailing list