Sha256: 3b5fe7d3b1b8b64482c1b392c54d74bd46255c464fb4640171c909784896d114
Contents?: true
Size: 577 Bytes
Versions: 9
Compression:
Stored size: 577 Bytes
Contents
require 'spec_helper' require 'command_mapper/sudo' describe CommandMapper::Sudo do let(:command) { %w[ls -la /root] } subject { described_class.new({command: command}) } describe "#initialize" do it "must accept a command keyword" do expect(subject.command).to eq(command) end end describe "#argv" do it "the first argument must be 'sudo'" do expect(subject.command_argv.first).to eq('sudo') end it "must end with the command arguments" do expect(subject.command_argv[-command.length..-1]).to eq(command) end end end
Version data entries
9 entries across 9 versions & 1 rubygems