Sha256: 0173ca6d4e67603a8363dc7179b351436a62d2ab6710884cec0721a1a103f013
Contents?: true
Size: 918 Bytes
Versions: 1
Compression:
Stored size: 918 Bytes
Contents
require 'spec_helper' module EpubValidator describe ProcessEpub do context "when it processes a file" do it "should return a message" do message = "Epubcheck Version 1.2\n\nERROR: rspec-test.epub: resource OEBPS/stylesheets/handbookish.css is missing\n\nCheck finished with warnings or errors!" ec = ProcessEpub.new ec.stub(:epubcheck).and_return(message) ec.epubcheck("test.epub").should eq(message) end it "should return the output message formatted" do message = "Epubcheck Version 1.2\n\nERROR: book.epub: resource OEBPS/stylesheets/handbookish.css is missing\n\nCheck finished with warnings or errors!" formatted_message = ["FAILED!", "ERROR: book.epub: resource OEBPS/stylesheets/handbookish.css is missing"] ec = ProcessEpub.new ec.format_epubcheck_output(message).should eq(formatted_message) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
epub_validator-0.1.1 | spec/epub_validator/process_epub_spec.rb |