Commit ce4a669d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Prefer described_class, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13810811
And other similar places.
parent 5f5503fb
......@@ -5,7 +5,7 @@ describe Gitlab::DataBuilder::BuildDataBuilder do
describe '.build' do
let(:data) do
Gitlab::DataBuilder::BuildDataBuilder.build(build)
described_class.build(build)
end
it { expect(data).to be_a(Hash) }
......
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::DataBuilder::NoteDataBuilder, lib: true do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:data) { Gitlab::DataBuilder::NoteDataBuilder.build(note, user) }
let(:data) { described_class.build(note, user) }
let(:fixed_time) { Time.at(1425600000) } # Avoid time precision errors
before(:each) do
......
......@@ -15,7 +15,7 @@ describe Gitlab::DataBuilder::PipelineDataBuilder do
let!(:build) { create(:ci_build, pipeline: pipeline) }
describe '.build' do
let(:data) { Gitlab::DataBuilder::PipelineDataBuilder.build(pipeline) }
let(:data) { described_class.build(pipeline) }
let(:attributes) { data[:object_attributes] }
let(:build_data) { data[:builds].first }
let(:project_data) { data[:project] }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment