Sha256: e52758934d403cb37e5cc1b10f52b0f2bb35e9d5eea81713251ed54e7de6edc5

Contents?: true

Size: 1.46 KB

Versions: 110

Compression:

Stored size: 1.46 KB

Contents

require 'spec_helper'
require 'stringio'

module Kernel

  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    return out.string
  ensure
    $stdout = STDOUT
  end

end

describe Softcover::Commands::Check do

  subject(:check) do
    capture_stdout do
      Softcover::Commands::Check.check_dependencies!
    end
  end

  it { should match /all dependencies satisfied/i }

  describe "missing dependencies" do
    before do
      Softcover::Commands::Check.dependency_labels.each do |label|
        Softcover::Commands::Check.stub(:present?).with(label).and_return(false)
      end
    end

    it { should match /Checking for LaTeX.*Missing/ }
    it { should match /Checking for PhantomJS.*Missing/ }
    it { should match /Checking for Inkscape.*Missing/ }
    it { should match /Checking for Calibre.*Missing/ }
    it { should match /Checking for KindleGen.*Missing/ }
    it { should match /Checking for Java.*Missing/ }
    it { should match /Checking for EpubCheck.*Missing/ }
    it { should match /Checking for ImageMagick.*Missing/ }
    it { should match /Checking for Node\.js.*Missing/ }

    it { should match /Missing dependencies:/ }
    it { should match /LaTeX/ }
    it { should match /PhantomJS/ }
    it { should match /Inkscape/ }
    it { should match /Calibre/ }
    it { should match /KindleGen/ }
    it { should match /Java/ }
    it { should match /EpubCheck/ }
    it { should match /ImageMagick/ }
    it { should match /Node\.js/ }
  end
end

Version data entries

110 entries across 110 versions & 2 rubygems

Version Path
softcover-1.1.7 spec/commands/check_spec.rb
softcover-1.1.6 spec/commands/check_spec.rb
softcover-1.1.4 spec/commands/check_spec.rb
softcover-1.1.3 spec/commands/check_spec.rb
softcover-1.1.2 spec/commands/check_spec.rb
softcover-1.1.1 spec/commands/check_spec.rb
softcover-1.1.0 spec/commands/check_spec.rb
softcover-1.1.beta2 spec/commands/check_spec.rb
softcover-1.0.5 spec/commands/check_spec.rb
softcover-1.1.beta1 spec/commands/check_spec.rb
softcover-1.0.4 spec/commands/check_spec.rb
softcover-1.0.3 spec/commands/check_spec.rb
softcover-1.0.2 spec/commands/check_spec.rb
softcover-1.0.1 spec/commands/check_spec.rb
softcover-1.0.0 spec/commands/check_spec.rb
softcover-1.0.beta17 spec/commands/check_spec.rb
softcover-1.0.beta16 spec/commands/check_spec.rb
softcover-1.0.beta15 spec/commands/check_spec.rb
softcover-1.0.beta14 spec/commands/check_spec.rb
softcover-1.0.beta13 spec/commands/check_spec.rb