[rspec-users] spec command and windows

Brian Takita brian.takita at gmail.com
Fri Jan 5 20:39:26 EST 2007


Today I ran into some frustration with spec and windows.

We have a series of plugins that have either test suites and/or spec suites.
To avoid environment collisions, we have a "master" test suite that spawns
new process for all of the test suites and spec suites.
Every works great on posix. Unfortunately on windows, spec was not found.

The only way I figured to ensure we get to spec in a platform independent
way is to call:

success = true
dir = File.dirname(__FILE__)
spec_cmd = (RUBY_PLATFORM =~ /[^r]win/) ? 'C:\\ruby\\bin\\spec.cmd' : 'spec'
success &&= system("#{spec_cmd} --format specdoc --diff unified
# ...
exit success

Does somebody out there have a better solution? Could rspec be run from ruby

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070105/6f6a5e28/attachment.html 

More information about the rspec-users mailing list