spec/lib/epubinfo_spec.rb in epubinfo-0.2.1 vs spec/lib/epubinfo_spec.rb in epubinfo-0.2.2
- old
+ new
@@ -4,10 +4,12 @@
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
- EPUBInfo::Parser.should_receive(:parse) { 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