spec/collection_spec.rb in emojidex-0.0.12 vs spec/collection_spec.rb in emojidex-0.0.13

- old
+ new

@@ -80,9 +80,20 @@ FileUtils.rm_rf tmp_cache_path end end + describe '.write_index' do + it 'writes a cleaned index to the specified location' do + tmp_cache_path = File.expand_path('../support/tmpcache', __FILE__) + FileUtils.mkdir_p(tmp_cache_path) + collection.cache_index tmp_cache_path + expect(File.exist? tmp_cache_path + '/emoji.json').to be_truthy + + FileUtils.rm_rf tmp_cache_path + end + end + describe '.generate_checksums' do it 'generates checksums for assets' do expect(collection.generate_checksums).to be_an_instance_of(Array) expect(collection.emoji.values.first.checksums[:svg]).to be_truthy expect(collection.emoji.values.first.checksum?(:svg)).to be_truthy