Sha256: b074361e7d7850ca3f485a4bcb758be3ec4ac07f49c78b35106c73c934353ff8

Contents?: true

Size: 390 Bytes

Versions: 2

Compression:

Stored size: 390 Bytes

Contents

module Helpers
  def mock_rdiff_installed(value)
    result = value == :yes
    RdiffSimple.stub(:system).with('which rdiff-backup').and_return(result)
  end

  def mock_rdiff_command(command, value)
    result = value == :succeeded

    commands = [ 'rdiff-backup' ]
    commands << command unless command.empty?

    RdiffSimple.stub(:system).with(*commands).and_return(result)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rdiff-simple-0.0.6 spec/helpers.rb
rdiff-simple-0.0.5 spec/helpers.rb