Sha256: a181eb4df6ede3ea22a614b51b0992788ca1f3ffe04f4e4108929c803bd4d217

Contents?: true

Size: 729 Bytes

Versions: 4

Compression:

Stored size: 729 Bytes

Contents

require 'spec_helper_system'

describe "rcp:" do
  it 'check rcp works with block matchers' do
    rcp(
      :sp => fixture_root + 'example_dir',
      :dp => '/tmp/example_destination1'
    ) do |r|
      r.success.should be_true
    end

    shell 'cat /tmp/example_destination1/example_file' do |r|
      r.exit_code.should be_zero
      r.stdout.should =~ /Test content 1234/
    end
  end

  it 'check rcp works outside a block' do
    r = rcp(
      :sp => fixture_root + 'example_dir',
      :dp => '/tmp/example_destination2'
    )
    r.success.should be_true

    shell 'cat /tmp/example_destination2/example_file' do |r|
      r.exit_code.should be_zero
      r.stdout.should =~ /Test content 1234/
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-system-2.1.2 spec/system/rcp_spec.rb
rspec-system-2.1.1 spec/system/rcp_spec.rb
rspec-system-2.1.0 spec/system/rcp_spec.rb
rspec-system-2.0.0 spec/system/rcp_spec.rb