Sha256: 4ce1db550087d0e12e5200f2e735240cebcabbba3453f723fc75d85ee310bd14

Contents?: true

Size: 688 Bytes

Versions: 15

Compression:

Stored size: 688 Bytes

Contents

require 'spec_helper'

describe Mina::Backend::Remote do
  let(:backend) { Mina::Backend::Remote.new ['ls -al'] }
  before { Mina::Configuration.instance.set(:domain, 'localhost') }
  after { Mina::Configuration.instance.remove(:domain) }

  describe '#prepare' do
    it 'escpaces shellwords' do
      expect(backend.prepare).to eq("ssh localhost -p 22 -tt -- \\[\\\"ls\\ -al\\\"\\]")
    end

    it 'adds debug if simualte' do
      Mina::Configuration.instance.set(:simulate, true)
      expect(backend.prepare).to eq("#!/usr/bin/env bash\n# Executing the following via 'ssh localhost -p 22 -tt':\n#\nls -al\n ")
      Mina::Configuration.instance.remove(:simulate)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mina-1.2.4 spec/lib/mina/backend/remote_spec.rb
mina-1.2.3 spec/lib/mina/backend/remote_spec.rb
mina-1.2.2 spec/lib/mina/backend/remote_spec.rb
mina-1.2.1 spec/lib/mina/backend/remote_spec.rb
mina-1.2.0 spec/lib/mina/backend/remote_spec.rb
mina-1.1.1 spec/lib/mina/backend/remote_spec.rb
mina-1.1.0 spec/lib/mina/backend/remote_spec.rb
mina-1.0.7 spec/lib/mina/backend/remote_spec.rb
mina-1.0.6 spec/lib/mina/backend/remote_spec.rb
mina-1.0.5 spec/lib/mina/backend/remote_spec.rb
mina-1.0.4 spec/lib/mina/backend/remote_spec.rb
mina-1.0.3 spec/lib/mina/backend/remote_spec.rb
mina-1.0.2 spec/lib/mina/backend/remote_spec.rb
mina-1.0.0 spec/lib/mina/backend/remote_spec.rb
mina-1.0.0.rc2 spec/lib/mina/backend/remote_spec.rb