Sha256: c1096a3cd2bd5b3bd0e5ecfb5d287bb26e2fece97f6241b91992990538ad3039
Contents?: true
Size: 646 Bytes
Versions: 1
Compression:
Stored size: 646 Bytes
Contents
require 'spec_helper' describe EPUBInfo do let(:epub_path) { File.expand_path('spec/support/binary/metamorphosis_epub2.epub') } describe '#get' do it 'calls parser' do document = EPUBInfo::Parser.parse(epub_path).metadata_document parser = mock parser.stub(:metadata_document) parser.stub(:drm_protected?) EPUBInfo::Parser.should_receive(:parse) { parser } EPUBInfo.get(epub_path) end it 'instanstiates a book model and returns it' do book_mock = mock EPUBInfo::Models::Book.should_receive(:new) { book_mock } EPUBInfo.get(epub_path).should == book_mock end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
epubinfo-0.3.0 | spec/lib/epubinfo_spec.rb |