platforms test

This commit is contained in:
John Bintz 2011-06-03 09:27:44 -04:00
parent 24ec7a0cc4
commit 0c94a14107
1 changed files with 7 additions and 1 deletions

View File

@ -6,13 +6,19 @@ namespace :spec do
task :platforms do
current = %x{rvm-prompt v}
fail = false
%w{1.8.7 1.9.2 ree}.each do |version|
puts "Switching to #{version}"
system %{rvm #{version}}
system %{bundle exec rspec spec}
break if $?.exitstatus != 0
if $?.exitstatus != 0
fail = true
break
end
end
system %{rvm #{current}}
exit (fail ? 1 : 0)
end
end