moxley / atom-ruby-test

Run Ruby tests, Rspec examples, and Cucumber features from Atom
MIT License
43 stars 36 forks source link

question: any idea why just {relative_path} doesn't find test file? #38

Closed tony-kerz closed 9 years ago

tony-kerz commented 9 years ago

for some reason, when the package runs:

ruby -I test {relative_path}

i get a cannot load such file error, but if i manually set the following in the configuration:

ruby -I test /path/to/my/test/folder/{relative_path}

it works.

any ideas how to make relative pathing work, or grab absolute path from the environment?

best, tony.

moxley commented 9 years ago

Try adding the the root folder that contains your source files to the command. For instance, let's say I have source files like in lib with relative paths like foo.rb and foo/bar.rb. I would add lib like this:

ruby -I lib -I test {relative_path}

Also important: make sure the command runs successfully from the command line before trying to configure it in Atom/Ruby Test.

tischler commented 9 years ago

I'm running into the same issue.

I'm new to atom, so I'm still trying to figure out how to debug/edit plugins while they're installed but I'll look into this once I'm up and running.

teddy1004 commented 9 years ago

I'm running into the same issue, I can run these commands from the command line, but failed in atom-ruby-test.

moxley commented 9 years ago

Try the latest version (0.9.11), open the developer tools console (Cmd+Opt+I for OS X), and run a test on a file. Ruby-test now logs debug information about the command for the current running test. Does everything look in that log entry look OK? Can you paste it here?

teddy1004 commented 9 years ago

I update to the latest version of ruby-test and it now works, thanks