diff --git a/lib/mspec/helpers/ruby_exe.rb b/lib/mspec/helpers/ruby_exe.rb index 8c4089ba..497c08c4 100644 --- a/lib/mspec/helpers/ruby_exe.rb +++ b/lib/mspec/helpers/ruby_exe.rb @@ -108,7 +108,9 @@ def resolve_ruby_exe exe, *rest = cmd.split(" ") if File.file?(exe) and File.executable?(exe) - return [File.expand_path(exe), *rest].join(" ") + exe = File.expand_path(exe) + exe = exe.tr('/', '\\') if PlatformGuard.windows? + return [exe, *rest].join(" ") end end nil