I would like to ask a question about this method:
org.jbehave.core.ConfigurableEmbedder.configuration().

Sometimes errors can occur if always a new instance of this object is
returned, for example new report format objects are created. This is why
they are constants in org.jbehave.core.reporters.Format I suppose.

As it seems, JBehave calls the configuration() method multiple times while
it executes stories. If it would only call it once, then no singletons
would be required like the formats and no JBehave user could be trapped by
this.

The JBehave examples always return a new configuration object, which can be
tricky, since it can cause errors.

So I want to ask two things: Why does JBehave call configuration() method
multiple times? Maybe it would be better to call it just once. And: If it
needs to call it multiple times, would it be better if the JBehave examples
in Github would return the same configuration instance instead of returning
a new one each time?

Reply via email to