Commit 7ac100fdb22e4b8a790da438334bbc04cada15ac

Authored by larissa
Committed by Rafael Manzo
1 parent d9d46b31

closes issue #47, the variables named configuration were all changed to mezuro_c…

…onfiguration. Signed-off-by: Larissa Rodrigues <larissax55@gmail.com> Signed-off-by: Vinicius Franco <viniciusf.arantes@gmail.com>
Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
features/step_definitions/repository_steps.rb
1 Given(/^I have a sample configuration with native metrics$/) do 1 Given(/^I have a sample configuration with native metrics$/) do
2 reading_group = FactoryGirl.create(:reading_group, id: nil) 2 reading_group = FactoryGirl.create(:reading_group, id: nil)
3 reading = FactoryGirl.create(:reading, {id: nil, group_id: reading_group.id}) 3 reading = FactoryGirl.create(:reading, {id: nil, group_id: reading_group.id})
4 - @configuration = FactoryGirl.create(:mezuro_configuration, id: nil) 4 + @mezuro_configuration = FactoryGirl.create(:mezuro_configuration, id: nil)
5 metric_configuration = FactoryGirl.create(:metric_configuration, 5 metric_configuration = FactoryGirl.create(:metric_configuration,
6 {id: nil, 6 {id: nil,
7 metric: FactoryGirl.build(:loc), 7 metric: FactoryGirl.build(:loc),
8 reading_group_id: reading_group.id, 8 reading_group_id: reading_group.id,
9 - configuration_id: @configuration.id, 9 + configuration_id: @mezuro_configuration.id,
10 code: 'loc'}) 10 code: 'loc'})
11 range = FactoryGirl.build(:mezuro_range, {id: nil, reading_id: reading.id, beginning: '-INF', :end => 'INF', metric_configuration_id: metric_configuration.id}) 11 range = FactoryGirl.build(:mezuro_range, {id: nil, reading_id: reading.id, beginning: '-INF', :end => 'INF', metric_configuration_id: metric_configuration.id})
12 range.save 12 range.save
@@ -14,12 +14,12 @@ end @@ -14,12 +14,12 @@ end
14 14
15 Given(/^I have a sample repository within the sample project$/) do 15 Given(/^I have a sample repository within the sample project$/) do
16 @repository = FactoryGirl.create(:repository, {project_id: @project.id, 16 @repository = FactoryGirl.create(:repository, {project_id: @project.id,
17 - configuration_id: @configuration.id, id: nil}) 17 + configuration_id: @mezuro_configuration.id, id: nil})
18 end 18 end
19 19
20 Given(/^I have a sample repository within the sample project named "(.+)"$/) do |name| 20 Given(/^I have a sample repository within the sample project named "(.+)"$/) do |name|
21 @repository = FactoryGirl.create(:repository, {project_id: @project.id, 21 @repository = FactoryGirl.create(:repository, {project_id: @project.id,
22 - configuration_id: @configuration.id, id: nil, name: name}) 22 + configuration_id: @mezuro_configuration.id, id: nil, name: name})
23 end 23 end
24 24
25 Given(/^I start to process that repository$/) do 25 Given(/^I start to process that repository$/) do
@@ -115,7 +115,7 @@ Then(/^I should see the given repository&#39;s content$/) do @@ -115,7 +115,7 @@ Then(/^I should see the given repository&#39;s content$/) do
115 expect(page).to have_content(@repository.name) 115 expect(page).to have_content(@repository.name)
116 expect(page).to have_content(@repository.license) 116 expect(page).to have_content(@repository.license)
117 expect(page).to have_content(@repository.address) 117 expect(page).to have_content(@repository.address)
118 - expect(page).to have_content(@configuration.name) 118 + expect(page).to have_content(@mezuro_configuration.name)
119 expect(page).to have_content("1 day") # The given repository periodicity 119 expect(page).to have_content("1 day") # The given repository periodicity
120 end 120 end
121 121
@@ -144,7 +144,7 @@ Then(/^I should see the saved repository&#39;s content$/) do @@ -144,7 +144,7 @@ Then(/^I should see the saved repository&#39;s content$/) do
144 expect(page).to have_content(@repository.name) 144 expect(page).to have_content(@repository.name)
145 expect(page).to have_content(@repository.license) 145 expect(page).to have_content(@repository.license)
146 expect(page).to have_content(@repository.address) 146 expect(page).to have_content(@repository.address)
147 - expect(page).to have_content(@configuration.name) 147 + expect(page).to have_content(@mezuro_configuration.name)
148 end 148 end
149 149
150 Then(/^"(.*?)" should be less than "(.*?)"$/) do |arg1, arg2| 150 Then(/^"(.*?)" should be less than "(.*?)"$/) do |arg1, arg2|