Introduce registrant presenter

registry-180
This commit is contained in:
Artur Beljajev 2016-10-31 14:55:20 +02:00
parent aa196d7d95
commit 66800402cb
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,20 @@
require 'rails_helper'
RSpec.describe RegistrantPresenter do
let(:registrant) { instance_double(Registrant) }
let(:presenter) { described_class.new(registrant: registrant, view: view) }
describe '#name' do
it 'returns name' do
expect(registrant).to receive(:name).and_return('test name')
expect(presenter.name).to eq('test name')
end
end
describe '#ident' do
it 'returns ident' do
expect(registrant).to receive(:ident).and_return('test ident')
expect(presenter.ident).to eq('test ident')
end
end
end