From f6191af722ff575810128e7edf529704e9e9537b Mon Sep 17 00:00:00 2001 From: Jakukyo Friel Date: Thu, 19 Mar 2015 21:54:37 +0800 Subject: [PATCH] Add a `sh` verifier to check shell exist code. `sh` verifier checks that a specific shell command exits with zero. --- lib/sprinkle/verifiers/sh.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/sprinkle/verifiers/sh.rb diff --git a/lib/sprinkle/verifiers/sh.rb b/lib/sprinkle/verifiers/sh.rb new file mode 100644 index 0000000..7578fcf --- /dev/null +++ b/lib/sprinkle/verifiers/sh.rb @@ -0,0 +1,21 @@ +module Sprinkle + module Verifiers + # = Test Verifier + # + # Checks that a specific shell command exits with zero. + # + # == Example Usage + # + # verify { sh '' } + # + module Sh + Sprinkle::Verify.register(Sprinkle::Verifiers::Sh) + + # Checks to make sure a test runs successfully on the remote server + def sh(args) + @commands << "#{args}" + end + + end + end +end