diff options
author | Rémy Coutable <remy@rymai.me> | 2017-01-09 23:47:15 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-18 18:38:34 +0300 |
commit | 78874519db2ca2f18a2fbca5fe070292e521d0c1 (patch) | |
tree | b5b72b3f1f4845669f0da53e9a513c2f58cb495f /spec/models/concerns/presentable_spec.rb | |
parent | e5a29b451473c6f188d5096f21055d27a51fdf90 (diff) |
Add Presentable concern
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/concerns/presentable_spec.rb')
-rw-r--r-- | spec/models/concerns/presentable_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/concerns/presentable_spec.rb b/spec/models/concerns/presentable_spec.rb new file mode 100644 index 00000000000..6640a5e1377 --- /dev/null +++ b/spec/models/concerns/presentable_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe Presentable do + let(:build) { create(:ci_build) } + + describe '#present' do + it 'returns a presenter' do + expect(build.present).to be_a(Ci::Build::Presenter) + end + + it 'takes optional attributes' do + expect(build.present(foo: 'bar').foo).to eq('bar') + end + end +end |