[rspec-users] stepping across features

James Byrne lists at ruby-forum.com
Tue Dec 2 15:41:28 EST 2008

I am perplexed by a situation that I am creating for myself, probably
out of ignorance.  I have two models connected through a join table
which itself contains information related to the join.  I am testing the
creation of this join.

I already have step definitions written for one of the outside models
that include methods to create new records.  I say methods because I
have broken down the processing to initializing the model instance,
populating the attributes, and then saving it.

Now, where I think I may be about to commit a grave error is in the step
definitions for the features relating to the join model.  Which path
should I take:

1. Call the existing step definitions in the outer model to create a
test instance? or

2. Replicate the effect of those existing steps inside the step
definition file for the join model and create test instances of the
outer models completely from within that file.

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list