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

rspec can't find files to run under ruby 1.9.2 #29

Closed
ku1ik opened this issue May 25, 2010 · 4 comments
Closed

rspec can't find files to run under ruby 1.9.2 #29

ku1ik opened this issue May 25, 2010 · 4 comments

Comments

@ku1ik
Copy link

ku1ik commented May 25, 2010

Ruby 1.9.2 removed current directory (".") from $LOAD_PATH and rspec can't load the files given on the command line.

We can change our loading behavior to expand path to absolute path when requiring files (I've did that in my fork here: http://github.com/sickill/rspec-core/commit/ebcb95546fadb5b50b5e5e2e3128ff8aa01ed9a7).

If you feel this is "obscure workaround" then let's discuss other possible solutions.

@dchelimsky
Copy link
Contributor

This is about ruby-1.9.2 asking us to write rspec ./path/to/a_spec.rb instead of rspec path/to/a_spec.rb. Everything works fine if you do that, and I think it's up to us as developers to learn the new Ruby way as opposed to trying to compensate in code.

I'll close this for now, as I don't intend to change anything for this, but feel free to keep the conversation going here. I can always re-open it if the conversation leads us in that direction.

@dchelimsky
Copy link
Contributor

It turns out that you can add "-I." to a .rspec file in the project root (or ~/.rspec for global settings).

@ku1ik
Copy link
Author

ku1ik commented May 26, 2010

Oh, great. This is a good solution.

@dchelimsky
Copy link
Contributor

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

2 participants