Ensure rake spec exits with a meaningful exit code

This commit is contained in:
Kiall Mac Innes
2012-09-14 15:27:13 +01:00
parent ed8c2b95b8
commit d117b50fd3
+2 -1
View File
@@ -28,7 +28,8 @@ task :compile => "lib/handlebars/compiler/parser.js"
desc "run the spec suite"
task :spec => [:release] do
system "rspec -cfs spec"
rc = system "rspec -cfs spec"
fail "rspec spec failed with exit code #{$?.exitstatus}" if (rc.nil? || ! rc || $?.exitstatus != 0)
end
task :default => [:compile, :spec]