Commit bd6b0bc9e139df5432eaaa29544130aef8710940
1 parent
046080d1
Exists in
colab
and in
4 other branches
Use ruby native metrics instead of analizo metrics
* Creates a step to create a ruby configuration with the Saikuro metric * Define new factories for a saikuro metric and saikuro metric configuration
Showing
4 changed files
with
24 additions
and
1 deletions
Show diff stats
features/repository/notify_push.feature
... | ... | @@ -22,7 +22,8 @@ Feature: Notify push to repository |
22 | 22 | @kalibro_configuration_restart @kalibro_processor_restart |
23 | 23 | Scenario: Repository with an errored processing |
24 | 24 | Given I am a regular user |
25 | - And I have a sample configuration with native metrics | |
25 | + And I have a sample reading group | |
26 | + And I have a sample configuration with the Saikuro native metric | |
26 | 27 | And I have a compound metric configuration with script "rtrnaqdfwqefwqr213r2145211234ed a = b=2" within the given mezuro configuration |
27 | 28 | And I have a sample repository |
28 | 29 | And I start to process that repository | ... | ... |
features/step_definitions/repository_steps.rb
... | ... | @@ -119,6 +119,17 @@ Given(/^I am at the All Repositories page$/) do |
119 | 119 | visit repositories_path |
120 | 120 | end |
121 | 121 | |
122 | +Given(/^I have a sample configuration with the (\w+) native metric$/) do |metric| | |
123 | + metric_configuration_factory = (metric + "_metric_configuration").downcase | |
124 | + metric_factory = metric.downcase | |
125 | + @kalibro_configuration = FactoryGirl.create(:ruby_configuration) | |
126 | + metric_configuration = FactoryGirl.create(metric_configuration_factory.to_sym, | |
127 | + {id: 4, | |
128 | + metric: FactoryGirl.build(metric_factory.to_sym), | |
129 | + reading_group_id: @reading_group.id, | |
130 | + kalibro_configuration_id: @kalibro_configuration.id}) | |
131 | +end | |
132 | + | |
122 | 133 | When(/^I click on the sample metric's name$/) do |
123 | 134 | find_link(@metric_results.first.metric_configuration.metric.name).trigger('click') |
124 | 135 | end | ... | ... |
spec/factories/kalibro_configurations.rb
spec/factories/metric_configurations.rb
... | ... | @@ -39,4 +39,10 @@ FactoryGirl.define do |
39 | 39 | metric { FactoryGirl.build(:hotspot_metric) } |
40 | 40 | kalibro_configuration_id 1 |
41 | 41 | end |
42 | + | |
43 | + factory :saikuro_metric_configuration, class: MetricConfiguration do | |
44 | + metric { FactoryGirl.build(:saikuro) } | |
45 | + weight 1 | |
46 | + aggregation_form "MEAN" | |
47 | + end | |
42 | 48 | end | ... | ... |