Sha256: 369ba5fd41cb59ce2b93277c5d966d125386d5eb688d2d476b4a0f9e6b96837a
Contents?: true
Size: 704 Bytes
Versions: 23
Compression:
Stored size: 704 Bytes
Contents
require 'spec_helper' describe UsdaNutrientDatabase::Import::FoodGroups do let(:importer) { described_class.new('spec/support/sr25') } describe '#import' do before { importer.import } it 'should import all food groups' do expect(UsdaNutrientDatabase::FoodGroup.count).to eql(2) end it 'should import food group data correctly' do [ { code: '0100', description: 'Dairy and Egg Products' }, { code: '0200', description: 'Spices and Herbs' } ].each do |product| expect( UsdaNutrientDatabase::FoodGroup. where(code: product[:code], description: product[:description]).count ).to eql(1) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems