[rspec-users] Help with regexp in matcher
lists at ruby-forum.com
Tue Jan 13 15:10:38 EST 2009
Stephen Eley wrote:
> On Tue, Jan 13, 2009 at 10:41 AM, James Byrne <lists at ruby-forum.com>
>> Logins are a pervasive feature of this application
> Which is exactly why you should standardize. If you try to be
> accommodating toward unclear communication, you're just going to
> create confusion when people need to get things done.
I appreciate the advice and accept the wisdom that it contains. I have
no intention of handling with a regexp every situation where there might
be more than one English expression available to express a concept. Nor
do I intend to otherwise permit multiplicities of expression to exist.
However, on the matter of log in versus log on and its common
variations, I think I will stick with my initial instinct. Initially I
provided the different variants of login matchers along the lines shown
When /see a login success message/ do
When /see a log in success message/ do
Then "see a login success message"
When /see a sign on success message/ do
The revised regexp version simply puts all of these together in one
place for me. As for forcing people to remember that it is login and
not logon; well this project does not exist in a vacuum. The people
involved deal with at least three different operating systems every day,
each one of which has its own dialect with respect to what constitutes
an authenticated user. I will accept a little flexibility of expression
here in the service of user comfort.
In any case the term login, in the context of a web application
environment, seems a bit of a misnomer from the outset. I cannot get
too worked up over the idea of unclear communication when one is dealing
with as muddy a concept as that represented by login. Really, what I
should be saying is:
Given user "myuser" has a current authenticated session
And I see the session authenticated message
When I terminate my current session
Then the current session is destroyed
And I should see the user authentication request message
However, current authenticated session tends to be a little unwieldy in
Posted via http://www.ruby-forum.com/.
More information about the rspec-users