Sha256: ed3e902fd9007d6136fa277d07b6e4c6f9f540f5facae845027d6686868d4d7e
Contents?: true
Size: 435 Bytes
Versions: 78
Compression:
Stored size: 435 Bytes
Contents
# protip to prevent execution of shell commands during testsuite # see http://stackoverflow.com/questions/1628586/mock-system-call-in-ruby module Kernel def execute_with_stub(cmd) if cmd.include?('git') puts "WARNING: stubbing command execution within tests of command: #{cmd}", :red else execute_without_stub(cmd) end end alias_method :execute_without_stub, :` alias_method :`, :execute_with_stub end
Version data entries
78 entries across 78 versions & 2 rubygems