Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate step name if using Aruba in a Rails app #1

Closed
joshuaclayton opened this issue Feb 16, 2010 · 5 comments
Closed

Duplicate step name if using Aruba in a Rails app #1

joshuaclayton opened this issue Feb 16, 2010 · 5 comments

Comments

@joshuaclayton
Copy link

The step 'Then I should see "whatever"' is duplicated in web_steps.rb (provided when using cucumber-rails). My thought is to remove the step (allowing only for multiline) or change the text to be more clear that it's related to the command line; thoughts?

@aslakhellesoy
Copy link
Contributor

We actually named the step that in order to be consistent with web_steps.rb - it didn't occur to me that anyone would use both step definitions in the same project. I think a one-liner version of the stepdef is very handy, so I'd like to keep it.

Maybe something like this would address your conflict: https://rspec.lighthouseapp.com/projects/16211/tickets/531-declarative-mechanism-for-expressing-dependencies-on-step-definitions

@byrnejb
Copy link

byrnejb commented May 6, 2010

I commented on the ticket referred to above and it was suggested that it did not apply to the case at hand. I too find that some of the default steps distributed with Cucumber and Aruba are simply too greedy (in the regexp sense) to mesh well with user specified steps. "should see x in y" is a common a usage that should not conflict with canned step definitions. Similarly "I goto x" is a tad general.

My suggestion is that the canned steps be made more specific. As an example (only) I have changed the step_matchers in both web_steps and aruba/cucumber.rb to read (respectively):
@@@
Then /should see "([^\"]*)" (?:in the view| on the page)
@@@

and

@@@
Then /should see "([^\"]*)" (?:in the output|on the console)$/
@@@

Given the common linage of Aruba and Cucumber-Rails, I think that some thought should be given to letting them work together in a single project without forcing the end-user to wire things for themselves every time one or the other is updated.

@aslakhellesoy
Copy link
Contributor

You have a fair point. I'll change the aruba stepdef to /the output should contain "([^"]*)"/

@aslakhellesoy
Copy link
Contributor

Change regexen to avoid conflicts with e.g. Cucumber-Rails. This rings better anyway. Closed by bbdf052.

@joshuaclayton
Copy link
Author

ROCK! Thanks, this is perfect.

maxmeyer added a commit that referenced this issue Jun 26, 2015
…_directory_for_process

Cleanup "Process Management" #1
@e2 e2 mentioned this issue Apr 3, 2016
2 tasks
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants