This probably has a simple answer, but I’m working on a test suite that requires an input file that is in a different folder. I’d like to use a relative path, like this:
@graph = Graph.new('../lib/test_input.txt')
But Ruby doesn’t like that. What’s the best way to use a relative file path like that?
Thanks
If you mean relative to the current file, you’ll probably want something like:
If you mean relative to the current directory, you’ll probably want something like:
bonus link!