Sha256: a18cd48d9510058866e27cfd542ae4f2ca08210a52fd6f69316a0eb45a76ea4d

Contents?: true

Size: 556 Bytes

Versions: 18

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'

describe Mina::Backend::Local do
  let(:backend) { Mina::Backend::Local.new ['ls -al'] }
  describe '#prepare' do
    it 'escpaces shellwords' do
      Mina::Configuration.instance.remove(:simulate)
      expect(backend.prepare).to eq("\\[\\\"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:\n#\nls -al\n ")
      Mina::Configuration.instance.remove(:simulate)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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