spec/lib/mina/backend/local_spec.rb in mina-1.2.4 vs spec/lib/mina/backend/local_spec.rb in mina-1.2.5
- old
+ new
@@ -1,12 +1,15 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe Mina::Backend::Local do
- let(:backend) { Mina::Backend::Local.new ['ls -al'] }
+ let(:backend) { described_class.new ['ls -al'] }
+
describe '#prepare' do
it 'escpaces shellwords' do
Mina::Configuration.instance.remove(:simulate)
- expect(backend.prepare).to eq("\\[\\\"ls\\ -al\\\"\\]")
+ 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 ")