Rspec 3.1 Rake Task: escapes asterisks in pattern on Windows
Created by: lickettysplit
Hey all,
I just upgraded my gem dependencies for rspec-core from 3.0.2 to 3.1.4 and running the rake task now finds no tests. Running "bundle exec rake spec" now generates the following output:
C:/Ruby200/bin/ruby.exe -IC:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.1.4/l
ib;C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-support-3.1.0/lib C:/Ruby200/lib/ru
by/gems/2.0.0/gems/rspec-core-3.1.4/exe/rspec --pattern spec/{,/*/}/
*_spec.rb --fail-fast
No examples found.
Finished in 0.001 seconds (files took 0.12 seconds to load) 0 examples, 0 failures
Current rake task setup: RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = '--fail-fast' end
My test folder is set up to match the default structure, spec/*_/__spec.rb. It looks like the asterisks in the default pattern are being escaped, meaning that my tests are not being found. Adding the pattern option to the RakeTask results in the same issue but adding it in the rspec_opts section works, by appending a second --pattern argument to the cmd, without escaping the asterisks. I'm guessing this works because it overwrites the original --pattern argument.
Current environment: ruby 2.0.0p451 Windows 7 rspec gems: rspec-support 3.1.0 rspec-core 3.1.4 rspec-expectations 3.1.1 rspec-mocks 3.1.1 rspec 3.1.0