spec/downloader_spec.rb in oddb2xml-2.3.0 vs spec/downloader_spec.rb in oddb2xml-2.3.1

- old
+ new

@@ -444,11 +444,11 @@ it 'should clean up current directory' do expect { bin }.not_to raise_error expect(File.exist?('oddb2xml_files_nonpharma.txt')).to eq(false) end end -end +end unless SkipMigelDownloader describe Oddb2xml::ZurroseDownloader do include ServerMockHelper before(:all) do VCR.eject_cassette end before(:each) do @@ -456,10 +456,10 @@ c.before_record(:zurrose) do |i| if /zurrose/i.match(i.request.uri) puts "#{Time.now}: #{__LINE__}: URI was #{i.request.uri}" lines = i.response.body.clone.split("\n") to_add = lines[0..5] - Oddb2xml::GTINS_DRUGS.each{ |ean| to_add << lines.find{ |x| x.index(ean.to_s) } } + Oddb2xml::GTINS_DRUGS.each{ |ean| to_add << lines.find{ |line| line.index(ean.to_s) || /EPIMINERAL/i.match(line) } } i.response.body = to_add.compact.join("\n") i.response.headers['Content-Length'] = i.response.body.size end end end