Sven,

please file a JIRA issue with the suggestion and we'll be happy to add
the improvement:

http://jira.codehaus.org/browse/JBEHAVE

Cheers


On 30/12/2010 18:57, "Sven Schäfer" wrote:
> Hello,
>
> i think i have found my mistake.
> It was the "blank" after the comma. The first story after GivenStories was 
> found but not the following ones...
>
> But it would be nice if blank after comma is allowed or a newline to format 
> the text a little bit. Because i have build story´s with more than two 
> GivenStorie-Files and all in one line is a little bit confusing.
>  
> best regards
>
> Sven Schäfer
>
> -------- Original-Nachricht --------
>> Datum: Tue, 28 Dec 2010 21:06:05 +0100
>> Von: Mauro Talevi <[email protected]>
>> An: [email protected]
>> Betreff: Re: [jbehave-dev] Question: GivenStories Path-Problem
>> Hi Sven,
>>
>> can you please send a sample project that we can use to reproduce problem?
>>
>> The simplest possible project that shows the issue, buildable via Ant or
>> Maven.
>>
>> Thanks
>>
>> On 28/12/2010 21:01, "Sven Schäfer" wrote:
>>> Hello,
>>>
>>> i wrote some stories and in one i use the GivenStories Keyword.
>>> My project-structure looks like:
>>> ...
>>> src/main/java
>>>  /jbehave.config
>>>         /*.java
>>>         /ExampleRunStories.java
>>>  /jbehave.steps
>>>         /*.java
>>> src/main/resouces
>>>  /spec
>>>         /*.story 
>>> ...
>>>
>>> In the story i wrote:
>>>
>>> GivenStories: spec/MeineGeschichte.story, ...
>>>
>>> With that jbehave doesnt find the story. I test also some variations:
>>> **/spec/MeineGeschichte.story ... /spec/MeineGeschichte.story and so on
>> but nothing works.
>>> So i implement a class to extend LoadFromClasspath and override
>> loadStoryAsText.
>>> {code}
>>>     public class MyLoadFromClasspath extends LoadFromClasspath {
>>>        
>>>         public MyLoadFromClasspath(Class<?> classe) {
>>>             super(classe);
>>>         }
>>>        
>>>         /**
>>>          * @see
>> org.jbehave.core.io.LoadFromClasspath#loadStoryAsText(java.lang.String)
>>>          */
>>>         @Override
>>>         public String loadStoryAsText(String storyPath) {
>>>             List<String> findPaths = new
>> StoryFinder().findPaths(codeLocationFromClass(this.getClass()), storyPath, 
>> "");
>>>             if (findPaths.size() == 0) {
>>>                 throw new RuntimeException("Pfad nicht gefunden: " +
>> storyPath);                
>>>             } else {
>>>                 storyPath = findPaths.get(0);
>>>             }
>>>             return super.loadStoryAsText(storyPath);
>>>         }
>>>     } 
>>> {code}
>>>
>>> And use this class in my storyrunner. This works fine for me.
>>> GivenStories: **/spec/MeineGeschichte.story 
>>> -> now works
>>>
>>> But i think i doing something wrong? I think it ought to work without my
>> workaround...
>>> best regards
>>>
>>> Sven Schäfer
>>>
>>> Sry for my bad english... ;(
>>>
>>
>> ---------------------------------------------------------------------
>> 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