Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-01-09 23:47:15 +0300
committerRémy Coutable <remy@rymai.me>2017-01-18 18:38:34 +0300
commit78874519db2ca2f18a2fbca5fe070292e521d0c1 (patch)
treeb5b72b3f1f4845669f0da53e9a513c2f58cb495f /spec/models/concerns/presentable_spec.rb
parente5a29b451473c6f188d5096f21055d27a51fdf90 (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.rb15
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