Merge pull request #313 from redpie/rake-spec-exitcode

Ensure `rake spec` exits with a meaningful exit code
This commit is contained in:
Yehuda Katz
2012-09-14 20:24:29 -07:00
+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]