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

Configuration hook (custom load paths?) #62

Closed
searls opened this issue Aug 22, 2016 · 5 comments
Closed

Configuration hook (custom load paths?) #62

searls opened this issue Aug 22, 2016 · 5 comments
Assignees

Comments

@searls
Copy link
Collaborator

searls commented Aug 22, 2016

I'm hoping to get parity between m and my test task in rake, which adds a load path:

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList['test/helper.rb', 'test/**/*_test.rb']
end

As a result, my require statements for test-scoped files don't work when I'm running via m. Is there any kind of configuration hook available?

@zamith
Copy link
Collaborator

zamith commented Aug 30, 2016

Sorry for the late reply. There is currently no configuration for that.

lib is required if you're running a single file or line, but not for directories, since we have a different way to run those. I could simply add lib on directories as well, or make this configurable. I'm not sure how valuable it would be to have this config option.

Have you had this issue with any other directories? Because testis already in the load path for both directories and single files and lib is as I just described.

Feedback is welcome.

@zamith
Copy link
Collaborator

zamith commented Aug 31, 2016

You can check out what it might look like with an option in this branch.

Usage would be something like: m -Ipath example_test.rb.

@zamith
Copy link
Collaborator

zamith commented Sep 26, 2016

@searls Did you get to test the branch? Is this something you're still interested in?

@zamith zamith self-assigned this Sep 26, 2016
@searls
Copy link
Collaborator Author

searls commented Sep 27, 2016

Sorry, I tried and then failed to get something to work (I can't remember what) and ended up removing 'm' from my gem config because I needed to maintain 1.8 support

@zamith
Copy link
Collaborator

zamith commented Sep 27, 2016

Oh, sorry to hear that. 1.8 support is something I won't be adding again, but hopefully you'll be able to use m in other projects.

@zamith zamith closed this as completed Sep 27, 2016
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