Sha256: 32dd7f57841b3be174be351598679c78f828a370c70294df0724e0132a1d08cc

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

require 'spec_helper'
require 'rsync'

describe Rsync do
  around(:each) do |example|
    TempDir.create do |src, dest|
      @src = src
      @dest = dest
      example.run
    end
  end

  it "should work" do
    @src.mkdir("blah")
    Rsync.run(@src.path + "/", @dest.path, ["-a"])
    @dest.should eql(@src)
  end

  it "should dry run" do
    @src.mkdir("blah")
    Rsync.run(@src.path + "/", @dest.path, ["-a", "-n"])
    @dest.should_not eql(@src)
  end

  it "should list changes" do
    @src.mkdir("blah")
    result = Rsync.run(@src.path + "/", @dest.path, ["-a"])
    result.should be_success
    result.changes.length.should eql(1)
    @dest.should eql(@src)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rsync-1.0.7 spec/rsync_spec.rb
rsync-0.0.6 spec/rsync_spec.rb
rsync-0.0.5 spec/rsync_spec.rb
rsync-0.0.4 spec/rsync_spec.rb