You can control this behaviour via the StoryPathResolver of the Configuration. In the GridStory add the second line:

 @Override
    public Configuration configuration() {
        return new MostUsefulConfiguration()
            // where to find the stories
            .useStoryLoader(new LoadFromClasspath(this.getClass()))
            // use case preserving resolver
            .useStoryPathResolver(new CasePreservingResolver())
            // CONSOLE and TXT reporting
.useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT));
    }

As for the files organisation, there is no particular one recommended. It's up to you do decide where it makes more sense to have your textual stories, in Java packages or in separate resources dir (a la Maven). With Ant, it's your responsibility to ensure they end up in the classpath from where StoryFinder can pick them up. The finder can also find them from absolute file paths outside of the classpath, but this make the build less portable.

One thing I would say is recommendable to use the same configuration for multiple textual stories, i.e. inherit from JUnitStories rather than JUnitStory.

Anyway, feel free to share any newbie experience in using JBehave with Ant and Eclipse. The examples focus on Maven and Eclipse (although there is one example dedicated to Ant).

Cheers

On 20/12/2012 23:09, Mark Wilhelm wrote:
Hello,

I'm new to this so...

Is there a way to explicitly state the name of the associated story file?
For example, if I have a file "ICanToggleACell.java", I would like
to explicitly have it look for "ICanToggleACell.story" without
the automatic searching for "i_can_toggle_a_cell.story" seemingly
required file.  How should the configuration file "GridStory.java"?
be structured?

And is there a "Best Practices" organization of files with regard to jbehave.
I am using Eclipse and Ant for development.

Thank you,

Mark



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

     http://xircles.codehaus.org/manage_email




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

   http://xircles.codehaus.org/manage_email


Reply via email to