Sha256: ec122e97d9eab6a42102ea3a0593e25534d4a50de997b4661994ed224497b335
Contents?: true
Size: 554 Bytes
Versions: 29
Compression:
Stored size: 554 Bytes
Contents
require 'singleton' module Serverspec module Backend class Base include Singleton def set_commands(c) @commands = c end def set_example(e) @example = e end def commands @commands end def check_zero(cmd, *args) ret = run_command(commands.send(cmd, *args)) ret[:exit_status] == 0 end # Default action is to call check_zero with args def method_missing(meth, *args, &block) check_zero(meth, *args) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems