Add protocol base normalizer class

This commit is contained in:
Urban Rotnik 2019-05-14 15:09:37 +02:00
parent c1cee07a63
commit ec49388283
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
module ProtocolImporters
class ProtocolNormalizer
def load_all_protocols(_params: {})
raise NotImplementedError
end
def load_protocol(_id:, _params: {})
raise NotImplementedError
end
end
end

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
require 'rails_helper'
describe ProtocolImporters::ProtocolNormalizer do
describe '.load_all_protocols' do
it { expect { subject.load_all_protocols }.to raise_error(NotImplementedError) }
it { expect { subject.load_all_protocols(_params: 'some-params') }.to raise_error(NotImplementedError) }
end
describe '.load_protocol' do
it { expect { subject.load_protocol(_id: 'random-id') }.to raise_error(NotImplementedError) }
it { expect { subject.load_protocol(_id: 'random-id', _params: 'someparams') }.to raise_error(NotImplementedError) }
end
end