Sha256: cee84e3c505f980e0b9f5fbdede419637ef35f33b1afed48fcd562bf67a69348

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

require "spec_helper"

describe Kitabu::Cli do
  context "while running new" do
    context "when all params are valid" do
      before do
        capture(:stdout){ Kitabu::Cli.start(["new", tmpdir.join("mybook").to_s]) }
      end

      it_behaves_like "e-book"
    end

    it "exits with status 1 when no path is provided" do
      expect {
        capture(:stderr){ Kitabu::Cli.start(["new"]) }
      }.to exit_with_code(1)

      File.should_not be_directory(tmpdir.join("mybook"))
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kitabu-1.0.5 spec/kitabu/cli/new_spec.rb
kitabu-1.0.4 spec/kitabu/cli/new_spec.rb
kitabu-1.0.3 spec/kitabu/cli/new_spec.rb
kitabu-1.0.2 spec/kitabu/cli/new_spec.rb
kitabu-1.0.1 spec/kitabu/cli/new_spec.rb
kitabu-1.0.0 spec/kitabu/cli/new_spec.rb
kitabu-1.0.0.rc4 spec/kitabu/cli/new_spec.rb
kitabu-1.0.0.rc3 spec/kitabu/cli/new_spec.rb
kitabu-1.0.0.rc2 spec/kitabu/cli/new_spec.rb