Hi Dan,

On 18/11/2010 16:11, Dan Godfrey wrote:
> Hi,
>
> I'm putting some common GivenStories within a sub folder of my story
> folder, so that they don't get executed on their own. Something like this:
>
> common/common1.story
> common/common2.story
> story1.story
> story2.story
>
> Scenarios in both story1 and story2 have GivenStories:
> common/common2.story and common2.story has GivenStories: common1.story.
>
> However, this is breaking as it's not looking in the common sub-folder
> for common1.story, but looking in the main folder. Is this correct or
> do you want me to raise a JIRA issue?
>
Not sure I understand the problem.  The paths in the GivenStories are
not relative but absolute, at least wrt the classloader used in the
LoadFromClasspath(Class).

If you send sample project reproducing the problem we can have a look.
> More generally, is it considered "best practice" to use GivenStories?
> They're useful but come with some limitations, such as the above and
> using a GivenStory includes all scenarios from the story, meaning I
> need a story/scenario in some cases. But they do provide a useful way
> to store common data to be shared between multiple scenarios.
You could cherry-pick scenarios in a given story by using meta filters
at scenario level.

Or you may want to check out the new composite steps in 3.2-beta-1:

http://jbehave.org/reference/preview/composite-steps.html
>
> On a brighter note, apart from this and a few other teething issues,
> JBehave is working really well for me a the moment :)
>
Thanks nice to hear!   Thanks for feedback and patches.

Cheers

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to