Permalink
Browse files

Exit status spec

If a .travis.yml file has issues the Travis::Lint::Runner should
exit with a non-zero exit status. This is capture in the
travis_lint_runner_spec.rb
  • Loading branch information...
1 parent ebca6dc commit f1e88820893cb77f1295f101ffd88050e9a8f50f @dvberkel dvberkel committed Feb 27, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 spec/travis_lint_runner_spec.rb
@@ -0,0 +1,17 @@
+require "spec_helper"
+
+describe "A .travis.yml" do
+ context "with issues" do
+ it "run should exit with non-zero exit status" do
+ status = 0
+
+ begin
+ Travis::Lint::Runner.new(["spec/files/no_language_key.yml"]).run()
+ rescue SystemExit => e
+ status = e.status
+ end
+
+ status.should_not == 0
+ end
+ end
+end

0 comments on commit f1e8882

Please sign in to comment.