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

Fails to write coverage report when there is a space in the project path #48

Open
chrisbloom7 opened this issue May 24, 2011 · 4 comments

Comments

@chrisbloom7
Copy link

If you have a rails app in a path such as ~/Projects/My Project/myapp it appears that the cover_me gem is not able to create the coverage folder, and thus can't create the coverage report. There is no error at any point during the bundle install process or rails g cover_me:install process that would allude to this problem except for a non-fatal error at the end of a rake spec run.

The files /Users/chrisbloom7/Projects/My and /Users/chrisbloom7/Projects/My Project/myapp/Project/myapp/coverage/index.html do not exist.

Notice the how the first path in the error is truncated while the second path is duplicated.

@chrisbloom7
Copy link
Author

FYI - I've tried forking your project and mucking with the tests to see if I could trigger an error (changing fake_project to fake\ project and/or the root folder to cover\ me), but all the tests still passed. I'm not sure if the existing tests test for the specific problem.

@markbates
Copy link
Owner

I think the problem is actually that it's trying to launch the files using the open command and they're not properly escaped. Check out line 37 of config.rb.

Look at the project in the console after you run rake. Do you see coverage.data and coverage/ ?

@danielricecodes
Copy link

I'm experiencing the same problem on my machine - ruby 1.9.2 - I use Aptana Studio and the default workspace has several spaces in the path.

After I run "rake test" and I get this in the console:

The files /Users/danielrice/Documents/Aptana, /Users/danielrice/Documents/Aptana Studio 3 Workspace/fivepoint-star/Studio, /Users/danielrice/Documents/Aptana Studio 3 Workspace/fivepoint-star/3, and /Users/danielrice/Documents/Aptana Studio 3 Workspace/fivepoint-star/Workspace/fivepoint-star/coverage/index.html do not exist.

Any help is much appreciated. I'll take a look at line 37 of config.rb like you said. If I can fix it, I'll fork the project and help you out!

@danielricecodes
Copy link

And for reference, here's my actual path:

/Users/danielrice/Documents/Aptana Studio 3 Workspace/fivepoint-star

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