Hi Rickard,
Rickard Öberg wrote:
So you're saying there's a benefit to this behaviour? If so, I'm curious
to know in what way it is good. To me, right now, it just seems
confusing. I would prefer if words have meanings. Makes them easier to
use in my experience.
One immediate workaround is to slightly reword your steps so that
matching pattern is unique , e.g.
Given foo named Bar
...
When foo is cretaed with named Xyzzy
And this is what I have done. But I had to spend quite a lot of time
debugging my code, looking at test cases that sometimes works, and
sometimes don't work, because of this unexpected "behaviour". And then
to find that this design seems to be intentional - that words don't have
any meaning - was puzzling, especially in a BDD-project. Am I the only
one seeing a wee bit of irony here?
If you want to keep this behaviour, where words have no meaning, why not
simply replace all the annotations with @Generic. Then there would be
less of a learning curve! Just one annotation to learn!
I'm not calling it a bug simply because the current behaviour respects
the assumption made - i.e. that the pattern should be unique for all
annotations. It is a simplistic assumption (which should have been
communicated better) and we are now removing this limitation.
It does not mean that this behaviour is desirable in all circumstances.
In fact, Paul was telling me that he has come across this issue as well.
But the main point is that we recognise it as a change that would be
beneficial.
The idea behind the current implementation was that the uniqueness of
the matching pattern would be sufficient, given that the language
typically is different in step of different types. The enhancement that
would satisfy your use case is that it should be unique for each given
step type or annotation.
Yes, that would be appreciated.
But, as always we're driven by user requests and use cases. Why don't
you raise an enhancement request in Jira and we'll evaluate the impact
and backward compatibility. OTOH, I don't see any serious obstacles to
this kind of change, but I would to look into in a bit more detail
before giving a definite answer.
Sure, I've filed JBEHAVE-196: Words should have meanings.
I've slightly reworded it to better express current and proposed
changes. I've scheduled it for next release, currently 2.4 but we may
cut a 2.3.1 earlier.
Thanks for your feedback.
Cheers
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email