diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-01 16:00:44 +0100 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-09 15:11:39 +0100 |
commit | 1d268a89deef10854193db48d65cf5d519a0363d (patch) | |
tree | 59765b4a2f83b453875fa7aefe9b7ab5c65e3c67 /spec/models/global_milestone_spec.rb | |
parent | 519275c1102ad8a1d56f5807de2d8a1ae4b21dc0 (diff) | |
download | gitlab-ce-1d268a89deef10854193db48d65cf5d519a0363d.tar.gz |
adds second batch of tests changed to active tenseactive-tense-test-coverage
Diffstat (limited to 'spec/models/global_milestone_spec.rb')
-rw-r--r-- | spec/models/global_milestone_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/global_milestone_spec.rb b/spec/models/global_milestone_spec.rb index ae77ec5b348..92e0f7f27ce 100644 --- a/spec/models/global_milestone_spec.rb +++ b/spec/models/global_milestone_spec.rb @@ -29,15 +29,15 @@ describe GlobalMilestone, models: true do @global_milestones = GlobalMilestone.build_collection(milestones) end - it 'should have all project milestones' do + it 'has all project milestones' do expect(@global_milestones.count).to eq(2) end - it 'should have all project milestones titles' do + it 'has all project milestones titles' do expect(@global_milestones.map(&:title)).to match_array(['Milestone v1.2', 'VD-123']) end - it 'should have all project milestones' do + it 'has all project milestones' do expect(@global_milestones.map { |group_milestone| group_milestone.milestones.count }.sum).to eq(6) end end @@ -54,11 +54,11 @@ describe GlobalMilestone, models: true do @global_milestone = GlobalMilestone.new(milestone1_project1.title, milestones) end - it 'should have exactly one group milestone' do + it 'has exactly one group milestone' do expect(@global_milestone.title).to eq('Milestone v1.2') end - it 'should have all project milestones with the same title' do + it 'has all project milestones with the same title' do expect(@global_milestone.milestones.count).to eq(3) end end @@ -66,7 +66,7 @@ describe GlobalMilestone, models: true do describe '#safe_title' do let(:milestone) { create(:milestone, title: "git / test", project: project1) } - it 'should strip out slashes and spaces' do + it 'strips out slashes and spaces' do global_milestone = GlobalMilestone.new(milestone.title, [milestone]) expect(global_milestone.safe_title).to eq('git-test') |