2017-01-09 15:47:15 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Presentable do
|
2017-01-10 17:41:04 -05:00
|
|
|
let(:build) { Ci::Build.new }
|
2017-01-09 15:47:15 -05:00
|
|
|
|
|
|
|
describe '#present' do
|
|
|
|
it 'returns a presenter' do
|
2017-01-10 17:41:04 -05:00
|
|
|
expect(build.present).to be_a(Ci::BuildPresenter)
|
2017-01-09 15:47:15 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'takes optional attributes' do
|
|
|
|
expect(build.present(foo: 'bar').foo).to eq('bar')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|