Sha256: 13e927e160c3b760e10649fbd72b7f68243832b50a2a269fe89f3f025981a737
Contents?: true
Size: 611 Bytes
Versions: 3
Compression:
Stored size: 611 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) 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
epubinfo-0.2.4 | spec/lib/epubinfo_spec.rb |
epubinfo-0.2.3 | spec/lib/epubinfo_spec.rb |
epubinfo-0.2.2 | spec/lib/epubinfo_spec.rb |