3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksarequire 'spec_helper'
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksadescribe Hets::ProversOptions do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:parent_ontology) { create :linked_distributed_ontology }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:child_ontology) { parent_ontology.children.first }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa context 'with strings' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:options) { {node: child_ontology.name} }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:provers_options) { Hets::ProversOptions.new(options) }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa it 'does not change the options' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa expect(provers_options.options).to eq(options)
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa context 'with general objects' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:options) { {ontology: child_ontology} }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:provers_options) { Hets::ProversOptions.new(options) }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa it "removes the key 'ontology'" do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa expect(provers_options.options.has_key?(:ontology)).to be(false)
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa it 'sets :node to the ontology name' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa expect(provers_options.options[:node]).to eq(child_ontology.name)
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa context 'using the parent ontology' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:options) { {ontology: parent_ontology} }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa let(:provers_options) { Hets::ProversOptions.new(options) }
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa it 'it does not set :node' do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa expect(provers_options.options.has_key?(:node)).to be(false)
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa it "removes the key 'ontology'" do
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa expect(provers_options.options.has_key?(:ontology)).to be(false)
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksa end
3eb2f42df528f60b01e96cace480b0fea0b5a134Eugen Kuksaend