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

Cucumber feature subdirs #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jphpsf
Copy link

@jphpsf jphpsf commented Mar 7, 2011

I re-organized the features into sub-directories. This is a tip I read in the Rspec book which I find useful. As a project grows, it makes it easier to navigate through the features.

@radar
Copy link
Collaborator

radar commented Mar 7, 2011

This is quite a large change to make to the application and the book this far along.

However, I do agree with you on this. Don't think that I am ignoring this pull request, just rather letting it marinate while I come up with the motivation to fix this in the book as well as in ticketee.

@jphpsf
Copy link
Author

jphpsf commented Mar 8, 2011

No worries.

It is true that it is a big change that has impact on the book as you would have to change every listing that references the features path and add the subdir to it.

Maybe you can mention the idea in a tip box (like the one about "Combining redirect_to flash" on page 86)?

That would be a lot less changes to do in the book :)

@radar
Copy link
Collaborator

radar commented Mar 10, 2011

This works fine for running the entire feature set but when attempting to run a single feature using bundle exec cucumber it claims that it cannot find any of the steps.

Did you try this?

@jphpsf
Copy link
Author

jphpsf commented Mar 10, 2011

I did not try this. Out of habit, I just run cucumber and it works.

I tried bundle exec cucumber as well as rake cucumber and they both give the same issue

I will investigate and get back to you

@jphpsf
Copy link
Author

jphpsf commented Mar 10, 2011

So after digging a little, it seems that the config/cucumber.yml file needs a minor change: changing the line default: <%= std_opts %> to default: <%= std_opts %> features works.

Without that, it does not load the code under support (you can see that with --verbose).

I'll do more testing and update the pull request

Cheers

@jphpsf
Copy link
Author

jphpsf commented Mar 30, 2011

Here are my observations:

  1. The commands cucumber and bundle exec cucumber are both working

  2. The command rake cucumber does not work unless you make the change I mentioned in my previous comment (adding features to the default options; it looks like the cucumber.yml is outdated in the ticketee project as recent version of cucumber-rails would produce the cucumber.yml with that default: <%= std_opts %> features line)

  3. The commands cucumber features/projects/creating.feature or bundle exec cucumber features/projects/creating.feature do not work unless you pass the option --require feature. This is getting a lot to type, so one could create a shell alias or function for that. Or even a script. The issue seemed to have come up several time on cucumber mailing list (see for instance http://groups.google.com/group/cukes/browse_thread/thread/b9cccb18069b4a07)

TL;DR: If you want to target a specific feature, you need to have a --require features

Cheers

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

Successfully merging this pull request may close these issues.

2 participants