Sha256: 8cb659a8b6ec3f6bd0b387cd1cfb4f039aa31938cc033d22e132c56bdf080d22

Contents?: true

Size: 521 Bytes

Versions: 10

Compression:

Stored size: 521 Bytes

Contents

require 'spec_helper'

class TestShell
  include ImageOptimizer::Shell
end

describe ImageOptimizer::Shell do
  subject { TestShell.new }

  describe '#which' do
    it 'should find ruby' do
      expect(subject.which('ruby')).to_not be_nil
    end

    it 'should not find it' do
      expect(subject.which('something_that_should_not_exist_ever')).to be_nil
    end
  end

  describe '#run_command' do
    it 'run the command successfully' do
      expect(subject.run_command('ruby -v')).to_not be_nil
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
image_optimizer-1.9.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.8.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.7.2 spec/image_optimizer/shell_spec.rb
image_optimizer-1.7.1 spec/image_optimizer/shell_spec.rb
image_optimizer-1.7.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.6.1 spec/image_optimizer/shell_spec.rb
image_optimizer-1.6.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.5.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.4.0 spec/image_optimizer/shell_spec.rb
image_optimizer-1.3.0 spec/image_optimizer/shell_spec.rb