Check out the info on shared behaviors in the mocha wiki: 
 https://github.com/visionmedia/mocha/wiki/Shared-Behaviours

On Wednesday, May 15, 2013 2:36:48 PM UTC-6, Sam Roberts wrote:
>
> I'm about to pull the test functions out into basically a library, and 
> essentially do: 
>
> describe('apples', function() { 
>   should('taste good', fruit.tastesGood('apple')); 
> } 
>
> describe('oranges', function 
> .... tastesGood('orange') 
>
>
> Is there a better way? Basically I have multiple implementations of an 
> interface, and they should have the same behaviour, so I want them to 
> pass the same tests. Possibly with different beforeEach() fixtures. 
>
> Thanks, 
> Sam 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to