Quickfix output not allowing first error to be opened
After setting let g:rubytest_in_quickfix = 1 everything looked to function as expected:
- Run test
- Errors added to quickfix
However when the output finishes and the first error is opened the following happens:

It looks like the filename is getting prepended with [ which is leading to the inability to open the actual file.
I am a quickfix noob and tried to use :set modifiable in hopes that I could just remove the [ char and the file would open as desired. Hopefully someone has seen this issue before and there is a quick fix. (in the meantime I'll dig into the code and see if anything stands out)
Investigation
How quickfix list is created in the ExecTest(cmd) function
cex system(cmd)
I have a rather gross fix for this issue
cex substitute(system(cmd), '\[', '', 'g')
Not sure if there is a cleaner way to handle this issue but for now this is what I am using to get things working.
The same problem occurs with rspec3 but instead of [ there is a # on the beginning, so similar ugly hack for this would be:
cex substitute(system(cmd), '#', '', 'g')
or for both cases
cex substitute(system(cmd), '[\[#]', '', 'g')
Is there anyone owning this project who could advise an ideal solution? (cc: @janx )
It might be worthwhile to apply the "hack" for both cases but i am afraid there are cases that haven't been considered and will require another patch to fix.
@DanBradbury can you paste the raw test error log?
Since I cannot reproduce, your minttest/rspec version/settings will be helpful too.
Hey, thanks for taking care of this:
$ gem list | grep rspec rspec (3.1.0)
rspec-core (3.1.7)
rspec-expectations (3.1.2)
rspec-mocks (3.1.3)
rspec-rails (3.1.0)
rspec-support (3.1.2)
spring-commands-rspec (1.0.4)
$ ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
$ cat .rspec
-r rails_helper
--color
--format=documentation
$ rspec spec/example_spec.rb
...
1) Example example spec
Failure/Error: expect { @example.test }.to raise_error(ArgumentError)
expected ArgumentError but nothing was raised
# ./spec/example_spec.rb:50:in `block (3 levels) in <top (required)>'
...
rspec ./spec/example_spec.rb:49 # Example example spec
Notice the hashes in error outputs, that's why I added substitution.
Please let me know if e8e851402f644ee9907766f4ad6c19fe26d9c375 works.
Works like a charm, thank you :smile: