spec/collection_checker_spec.rb in emojidex-0.0.11 vs spec/collection_checker_spec.rb in emojidex-0.0.12
- old
+ new
@@ -37,16 +37,24 @@
expect(checker).to be_an_instance_of(Emojidex::CollectionChecker)
expect(checker.index_only).to be_empty
expect(checker.asset_only).to be_empty
end
+ it 'checks to see if a size of an asset exists' do
+ checker = Emojidex::CollectionChecker.new(col_good, {sizes: [:px64]})
+
+ expect(checker).to be_an_instance_of(Emojidex::CollectionChecker)
+ expect(checker.index_only.size).to eq(4)
+ expect(checker.asset_only).to be_empty
+ end
+
it 'checks for and identifies missing assets' do
checker = Emojidex::CollectionChecker.new(col_missing_assets, {sizes: @sizes})
expect(checker.asset_only).to be_empty
expect(checker.index_only.size).to eq(2)
expect(checker.index_only).to eq(
- {:nut_and_bolt=>["nut_and_bolt"], :purple_heart=>["px32/purple_heart"]})
+ {nut_and_bolt: ["nut_and_bolt.svg"], purple_heart: ["px32/purple_heart.png"]})
end
it 'checks for and identifies missing index entries' do
checker = Emojidex::CollectionChecker.new(col_missing_index, {sizes: @sizes})