Skip to content

Commit

Permalink
Use File::PATH_SEPARATOR
Browse files Browse the repository at this point in the history
- thanks to Luis Lavena for the pointer
- Closes #289.
  • Loading branch information
dchelimsky committed Jan 25, 2011
1 parent ada3a5d commit dbbb891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/core/rake_task.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def spec_command
cmd_parts << "bundle exec" if gemfile? unless skip_bundler cmd_parts << "bundle exec" if gemfile? unless skip_bundler
cmd_parts << runner cmd_parts << runner
if rcov if rcov
cmd_parts << ["-Ispec:lib", rcov_opts] cmd_parts << ["-Ispec#{File::PATH_SEPARATOR}lib", rcov_opts]
else else
cmd_parts << rspec_opts cmd_parts << rspec_opts
end end
Expand Down

2 comments on commit dbbb891

@atambo
Copy link

@atambo atambo commented on dbbb891 Feb 9, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks jruby on windows support as File::PATH_SEPARATOR returns ";" and results in:

'require': no such file to load -- spec_helper (LoadError)

when running the spec:rcov task.

Reverting this commit fixed the problem. Created issue for this here:

https://github.com/rspec/rspec-core/issues/issue/307

@sundbp
Copy link

@sundbp sundbp commented on dbbb891 Jul 11, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm running into this as well.
rcov explicitly says that it always uses ':' in its help, so I think using PATH_SEPARATOR is wrong.

Please sign in to comment.