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

Require paths in test.rb should be expanded #12

Open
voxik opened this issue May 2, 2012 · 5 comments
Open

Require paths in test.rb should be expanded #12

voxik opened this issue May 2, 2012 · 5 comments

Comments

@voxik
Copy link
Contributor

voxik commented May 2, 2012

In Ruby 1.9.3, there is no '.' in file search path, therefore the test suite needs to be executed by:

$ bacon -I. test/test.rb

But I consider the '-I.' superfluous and the correct approach should be to use the File.expand_path to obtain full path to require paths, e.g. the following command will do the change:

$ sed -i 's|direc = File.dirname(__FILE__)|direc = File.expand_path(File.dirname(__FILE__))|' test/test.rb

Thank you for consideration.

@banister
Copy link
Owner

banister commented May 2, 2012

why aren't you just using rake test to run tests?

@voxik
Copy link
Contributor Author

voxik commented May 2, 2012

I am not using Rake, since Rake is additional dependency and moreover it has tendency to bring in even more unnecessary dependencies, such as Hoe, etc.

@banister
Copy link
Owner

banister commented May 3, 2012

You're going to have a very hard time not using Rake, as almost every single ruby project uses it in one way or another ;)

Anyway, rake is defined as a developer dependency in the method_source gemspec, see here: https://github.com/banister/method_source/blob/master/method_source.gemspec#L24

@voxik
Copy link
Contributor Author

voxik commented May 3, 2012

I have nothing against using Rake for development purposes, but I am not running the test suite because I am developing. I am running the test suite, because I am packaging your gem for Fedora. I am not asking you to remove Rake, I just would like to improve your code versatility.

Btw not using Rake is pretty fine. I am maintaining more the 80 gems for Fedora and with few exceptions, you could count on one hand, I am pretty successful to execute the test suite not using Rake.

@banister
Copy link
Owner

banister commented May 3, 2012

Ah ok, no problem. Send me a pull request and i'll apply it ;)

Thanks

banister added a commit that referenced this issue May 3, 2012
Expand require paths (#12).
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