Hi Mauro,

I've tried to use a static atribute to retain the StepsConfiguration....

private static final StepsConfiguration configuration = new StepsConfiguration();


And I've used it after calling the constructor:

    public Steps4Manager(final KeyWords pKeywords) {
        this(configuration);
        configuration.useKeyWords(pKeywords);
    }


But jbehave throws a exception: StartingWordNotFound on method public boolean matches(String stepAsString)
No starting word found for step Dado que a página corrente seja a de manutenção de feriados of type GIVEN amongst {THEN=Then, GIVEN=Given, WHEN=When, AND=And}
.............

I've found where is the problem. The next statement is missed from useKeyWords method.

this.startingWordsByType = startingWordsByType(this.keywords);

Im sending to you a patch.

regards

Cristiano

Index: src/java/org/jbehave/scenario/steps/StepsConfiguration.java
===================================================================
--- src/java/org/jbehave/scenario/steps/StepsConfiguration.java (revision 1392)
+++ src/java/org/jbehave/scenario/steps/StepsConfiguration.java (working copy)
@@ -171,6 +171,8 @@
        public void useKeyWords(KeyWords keywords) {
                this.keywords = keywords;
                this.startingWords = startingWordsFrom(this.keywords);
+               this.startingWordsByType = startingWordsByType(this.keywords);
+
        }
 
 }
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to