Sha256: 75b84c6bb64fedbbbc27acdce9c4ba57c7828ee8ed270e9da9abdec33fa86d44

Contents?: true

Size: 687 Bytes

Versions: 6

Compression:

Stored size: 687 Bytes

Contents

require 'rsync/result'

describe Rsync::Result do
  it "should handle basic example" do
    result = Rsync::Result.new("", 0)
    result.changes.should eql([])
    result.error.should eql("Success")
    result.success?.should eql(true)
  end

  it "should handle basic example with changes" do
    result = Rsync::Result.new(">f......... filename\n", 0)
    result.changes.length.should eql(1)
    result.error.should eql("Success")
    result.success?.should eql(true)
  end

  it "should handle syntax error" do
    result = Rsync::Result.new("", 1)
    result.changes.should eql([])
    result.error.should eql("Syntax or usage error")
    result.success?.should eql(false)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rsync-1.0.8 spec/rsync/result_spec.rb
rsync-1.0.7 spec/rsync/result_spec.rb
rsync-0.0.6 spec/rsync/result_spec.rb
rsync-0.0.5 spec/rsync/result_spec.rb
rsync-0.0.4 spec/rsync/result_spec.rb
rsync-0.0.3 spec/rsync/result_spec.rb