entity_mapping_spec.rb revision 8855a26fb8a7c3743d2ae2cb817e21fb23b674c4
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornbergerrequire 'spec_helper'
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornbergerdescribe EntityMapping do
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
c00d76f9bce28fe681b17235609953424ac021e5Julian Kornberger context 'when importing an ontology', :needs_hets do
c00d76f9bce28fe681b17235609953424ac021e5Julian Kornberger let(:repository) { create :repository }
c00d76f9bce28fe681b17235609953424ac021e5Julian Kornberger let(:version) { add_fixture_file(repository, 'dol/simple_mapping') }
c00d76f9bce28fe681b17235609953424ac021e5Julian Kornberger let(:dist_ontology) { version.ontology }
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger before do
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger stub_hets_for(hets_out_file('simple_mapping'))
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger end
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger context 'which has mapped symbols' do
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger let(:ontology) { dist_ontology.children.find_by_name('test') }
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger it 'should not contain the mapped symbol' do
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger expect(ontology.entities.find_by_name('Human')).to be_nil
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger end
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger end
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger end
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornbergerend
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger
b66a6512eb6dea6cf5339eaa857a81d1b89cb4deJulian Kornberger