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

rake/testtask with t.loader = :direct doesn't run out of the box, overescapes #137

Closed
zenspider opened this issue Jun 8, 2016 · 1 comment · Fixed by #159
Closed

rake/testtask with t.loader = :direct doesn't run out of the box, overescapes #137

zenspider opened this issue Jun 8, 2016 · 1 comment · Fixed by #159

Comments

@zenspider
Copy link
Member

Given:

Rake::TestTask.new :test do |t|
  t.loader = :direct
  # t.test_files = FileList["./test/test*.rb"]
end

By default rake test wants to run with a pattern:

      @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil?

When I run this I get:

...
.../core_ext/kernel_require.rb:54:in `require': cannot load such file -- test/test*.rb (LoadError)
...
Command failed with status (1): [ruby -I"lib" -e "ARGV.each{|f| require f}" "test/test*.rb" ]

Notice the pattern in the command has quotes around it, preventing shell expansion. This is because that last argument is over-quoted by file_list_string:

    def file_list_string
      file_list.collect { |fn| "\"#{fn}\"" }.join(' ')
    end
@hsbt
Copy link
Member

hsbt commented Oct 4, 2016

@zenspider Can you try with master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants