# Dependency framework for RSpec

**URL:** <https://www.ruby-forum.com/t/dependency-framework-for-rspec/97402>\
**Category:** Ruby\
**Created:** [July 6, 2006, 8:58pm UTC](https://www.ruby-forum.com/t/dependency-framework-for-rspec/97402 "2006-07-06T20:58:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suraj\_NSKurapati](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@Suraj\_NSKurapati](https://www.ruby-forum.com/u/Suraj_NSKurapati)\
**Post date:** [July 6, 2006, 8:58pm UTC](https://www.ruby-forum.com/t/dependency-framework-for-rspec/97402/1 "2006-07-06T20:58:36Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hello,

I’ve been having difficulty sharing verification code between  
different contexts when using RSpec. For example, there is common  
verification code, between the following contexts, which checks that  
the stack is empty.

An empty stack

- 
  - is empty

A stack with one item

- 
  - is empty when popped

How others are handling this problem?

One idea is to somehow apply Rake’s task-dependency framework to  
contexts or their verification code. Though I’m not quite sure how  
to make this work.

Thanks for your consideration.  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFErVzfmV9O7RYnKMcRAhMyAKCrbIsDmOetUD63O5yfXNJBuTSC0gCgodU+  
nRaueR+B7uwn9MZmARc0cUQ=  
=OPZ0  
-----END PGP SIGNATURE-----
