Commit a85f6ffe authored by Vitali Tatarintev's avatar Vitali Tatarintev

Replace set to let_it_be in spec/presenters

Get rid of set in specs
parent f430ab5b
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
describe Ci::BridgePresenter do describe Ci::BridgePresenter do
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:pipeline) { create(:ci_pipeline, project: project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
set(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) } let_it_be(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) }
subject(:presenter) do subject(:presenter) do
described_class.new(bridge) described_class.new(bridge)
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
describe Ci::TriggerPresenter do describe Ci::TriggerPresenter do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:trigger) do let_it_be(:trigger) do
create(:ci_trigger, token: '123456789abcd', project: project) create(:ci_trigger, token: '123456789abcd', project: project)
end end
......
...@@ -5,11 +5,11 @@ require 'spec_helper' ...@@ -5,11 +5,11 @@ require 'spec_helper'
describe EventPresenter do describe EventPresenter do
include Gitlab::Routing.url_helpers include Gitlab::Routing.url_helpers
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:project) { create(:project, group: group) } let_it_be(:project) { create(:project, group: group) }
set(:target) { create(:milestone, project: project) } let_it_be(:target) { create(:milestone, project: project) }
set(:group_event) { create(:event, :created, project: nil, group: group, target: target) } let_it_be(:group_event) { create(:event, :created, project: nil, group: group, target: target) }
set(:project_event) { create(:event, :created, project: project, target: target) } let_it_be(:project_event) { create(:event, :created, project: project, target: target) }
describe '#resource_parent_name' do describe '#resource_parent_name' do
context 'with group event' do context 'with group event' do
......
...@@ -5,8 +5,8 @@ require 'spec_helper' ...@@ -5,8 +5,8 @@ require 'spec_helper'
describe LabelPresenter do describe LabelPresenter do
include Gitlab::Routing.url_helpers include Gitlab::Routing.url_helpers
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:project) { create(:project, group: group) } let_it_be(:project) { create(:project, group: group) }
let(:label) { build_stubbed(:label, project: project).present(issuable_subject: project) } let(:label) { build_stubbed(:label, project: project).present(issuable_subject: project) }
let(:group_label) { build_stubbed(:group_label, group: group).present(issuable_subject: project) } let(:group_label) { build_stubbed(:group_label, group: group).present(issuable_subject: 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