Sha256: 0d98cb28c885fc1e56aeac11c467a88518041901e421a65f4242e3e1f2861d96

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

require 'spec_helper'

module FixIphonePictureOrientation

  describe CmdRunner do
    it{should respond_to(:run)}
    context "running a simple command" do
      let(:result){CmdRunner.run('ls')}
      it {result.should be_an Array}
      it {result.length.should eq 3}
      it {result.last.success?.should be_true}
    end
    context "running a complex command" do
      let(:result){CmdRunner.run('ls','-l','-A','-F')}
      it {result.should be_an Array}
      it {result.length.should eq 3}
      it {result.last.success?.should be_true}
    end
    
    context "running a bogus command" do
      it {expect{CmdRunner.run("blahblahblah")}.to raise_error Errno::ENOENT}
    end


  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fix_iphone_picture_orientation-0.0.1 spec/lib/fix_iphone_picture_orientation/cmd_runner_spec.rb