-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 2.0.1 - Windows - Unable to run from anywhere but C drive #885
Comments
Oops! Actually it is not "drive other than the C drive", but "drive other then where the Cucumber-Ruby gem is installed", as far as I can tell. Most likely the same error would occur (and also in Cucumber v2.0.0), when trying to require step definitions from another drive then the workspace (current directory). |
Thanks for reporting this so promptly! It looks like there used to be a bug with this in a much earlier version of Ruby - https://redmine.ruby-lang.org/issues/1366 - but it was fixed. See also http://stackoverflow.com/questions/669417/ruby-relative-path-from-call-on-windows. |
The issue https://redmine.ruby-lang.org/issues/1366 was about mistake "C:" and "c:" (different capitalization) for different drives. Here we actually have different drives, so to me it looks like Exploring how the path in the location for step definitions (most commonly) are calculated cucumber/core_ext/proc.rb reveals that relative path is used only when the step definition is located below the current directory in the file system, otherwise absolute path is used (unless the step definition is loaded from an installed gem, where the relative path to the gem directory is used). For instance:
will result in that the step definitions form the global_step_defs directory will be printed by the Pretty formatter as something like:
Doing the same for the location for hooks (and step definitions base on symbols) would fix this issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm using Cucumber 2.0.1, Ruby 2.1.5, Windows 7.
This used to work fine on Cucumber 2.0.0.
If you try to run tests from a drive other than the C drive (My workspace is on the D drive), you get this:
The text was updated successfully, but these errors were encountered: