-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use bundle exec to kick off cucumber #54
base: master
Are you sure you want to change the base?
Conversation
This prompted the addition of flatten to the processing of the command and its arguments
Taking a cue from (defun cucumber-compilation-run (cmd)
"Run a cucumber process, dumping output to a compilation buffer."
(interactive)
(let* ((name (file-name-nondirectory (car (split-string cmd))))
(profile-name (cucumber-compilation-profile-name))
(cmdlist (append (split-string-and-unquote cucumber-compilation-executable)
(list "-p" profile-name
(expand-file-name cmd)))))
(pop-to-buffer (cucumber-compilation-do name cmdlist)))) In general, I don't think it's advisable to change the default command to use |
I didn't know how to change it really. The "split string" fails if you need an argument with a space (yea... so what? you might ask). Sometimes a package has the command string and then a list of arguments that can be added. I Googled looking for an emacs idiom for this but didn't find anything. As far as bundle, rake, etc... I can't claim any expertise here. My situation is that for some reason, running cucumber on the command line fails because selenium-webdriver is not on my system but running it via bundler works. The rubygems require tries to load all the dependencies of a gem so when capybara is loaded, it sees the dependency on selenium-webdriver, tries to load it, and fails. I assume bundle puts in its own method for require (like rubygems does) but does not load the dependencies. As far as what is preferred or recommended, I don't know for sure. I would assume the test wants to be as close to production as possible and in production, bundle is used to actually kick off the application (at least in the version of rails I'm running 3.2.8). Sprinkle liberally with disclaimers... I don't really know for sure about any of this. I posted a question on the mailing list and didn't get a reply so I tried hacking it myself. I hope this helps... |
Maybe go the more user-friendly way and do what I don't use cucumber though, so feel free to disregard. |
I posted a question on "cukes" (the google group for Cucumber). The short answer is, set up your environment properly and then just use "cucumber" (not via rake and not via bundle exec). I'm in the process of setting up my environment so that will work. |
Thanks for the update. Maybe comment again when you've got it working. Sounds like we can close this issue if you succeed! |
This prompted the addition of flatten to the processing
of the command and its arguments