Sha256: cf7ebc4b8f425dcf9eacd6f4c5fcfc612f74fa3a9d58a148d39dde4f6d74862d

Contents?: true

Size: 415 Bytes

Versions: 24

Compression:

Stored size: 415 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 execute_without_stub `
  alias ` execute_with_stub
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gitx-4.5.0 spec/support/stub_execution.rb
gitx-4.4.0 spec/support/stub_execution.rb
gitx-4.3.0 spec/support/stub_execution.rb
gitx-4.1.1 spec/support/stub_execution.rb
gitx-4.1.0 spec/support/stub_execution.rb
gitx-4.0.0 spec/support/stub_execution.rb
gitx-4.0.0.ci.234.1 spec/support/stub_execution.rb
gitx-3.2.0 spec/support/stub_execution.rb
gitx-3.2.0.ci.231.1 spec/support/stub_execution.rb
gitx-3.1.2 spec/support/stub_execution.rb
gitx-3.1.1 spec/support/stub_execution.rb
gitx-3.1.0.ci.216.1 spec/support/stub_execution.rb
gitx-3.1.0 spec/support/stub_execution.rb
gitx-3.0.2.ci.213.1 spec/support/stub_execution.rb
gitx-3.0.2.ci.207.1 spec/support/stub_execution.rb
gitx-3.0.2 spec/support/stub_execution.rb
gitx-3.0.1.ci.200.1 spec/support/stub_execution.rb
gitx-3.0.1 spec/support/stub_execution.rb
gitx-3.0.0.ci.188.1 spec/support/stub_execution.rb
gitx-3.0.0 spec/support/stub_execution.rb