Sha256: 1fdc3e9fba13377503e4a86feb6e487138a837b1c1ce61f5c7f29d2e431dca0c

Contents?: true

Size: 794 Bytes

Versions: 20

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

describe Softcover::Commands::EpubValidator do
  context 'epub file exists' do
    before(:all) do
      remove_book
      chdir_to_fixtures
      silence { `softcover new book --polytex` }
      chdir_to_book
      silence { `softcover build:epub` }
    end

    after(:all) { remove_book }

    subject { silence { Softcover::Commands::EpubValidator.validate! }  }
    it { should be_true }
  end

  context 'epub file not exists' do
    before(:all) do
      remove_book
      chdir_to_fixtures
      silence { `softcover new book --polytex` }
      chdir_to_book
    end

    after(:all) { remove_book }

    it 'should raise SystemExit error' do
      expect { silence { Softcover::Commands::EpubValidator.validate! } }.to raise_error(SystemExit)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
softcover-1.10.4 spec/commands/epub_validator_spec.rb
softcover-1.10.3 spec/commands/epub_validator_spec.rb
softcover-1.10.2 spec/commands/epub_validator_spec.rb
softcover-1.10.1 spec/commands/epub_validator_spec.rb
softcover-1.10.0 spec/commands/epub_validator_spec.rb
softcover-1.9.1 spec/commands/epub_validator_spec.rb
softcover-1.9.0 spec/commands/epub_validator_spec.rb
softcover-1.8.3 spec/commands/epub_validator_spec.rb
softcover-1.8.2 spec/commands/epub_validator_spec.rb
softcover-1.8.1 spec/commands/epub_validator_spec.rb
softcover-1.8.0 spec/commands/epub_validator_spec.rb
softcover-1.7.5 spec/commands/epub_validator_spec.rb
softcover-1.7.4 spec/commands/epub_validator_spec.rb
softcover-1.7.3 spec/commands/epub_validator_spec.rb
softcover-1.7.2 spec/commands/epub_validator_spec.rb
softcover-1.7.1 spec/commands/epub_validator_spec.rb
softcover-1.7.0 spec/commands/epub_validator_spec.rb
softcover-1.6.5 spec/commands/epub_validator_spec.rb
softcover-1.6.4 spec/commands/epub_validator_spec.rb
softcover-1.6.3 spec/commands/epub_validator_spec.rb