Sha256: 264e47d3883c868b152a7b357b3dae5add4a0f4810d6d92e19fd3259da04bbcd
Contents?: true
Size: 470 Bytes
Versions: 18
Compression:
Stored size: 470 Bytes
Contents
require 'spec_helper' describe "Cmds::assert" do it "should raise an error when the command fails" do expect{ Cmds.assert "exit 1" }.to raise_error Errno::EPERM end it "should do the same for Cmds!" do expect{ Cmds! "exit 1" }.to raise_error Errno::EPERM end it "should be chainable when the command is ok" do expect( Cmds!("echo hey").out ).to eq "hey\n" expect( Cmds.new("echo hey").capture.assert.out ).to eq "hey\n" end end # Cmds::run
Version data entries
18 entries across 18 versions & 1 rubygems