Skip to content

Commit

Permalink
add test for powershell command wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Dec 29, 2015
1 parent addcfdd commit 1e6a9b4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit/extras/command_wrapper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,18 @@
lc.run(cmd).must_equal "echo #{bpw} | base64 -d | sudo -S #{cmd}"
end
end

describe 'powershell command' do
let(:cls) { Train::Extras::PowerShellCommand }
let(:cmd) { rand.to_s }
let(:backend) {
backend = Train::Transports::Mock.new.connection
backend.mock_os({ family: 'windows' })
backend
}

it 'wraps commands in powershell' do
lc = cls.new(backend, {})
lc.run(cmd).must_equal "powershell #{cmd}"
end
end

0 comments on commit 1e6a9b4

Please sign in to comment.