Commit 4b32d5bf9cea1f85f61560959c64b651497affba
1 parent
5031856d
Exists in
colab
and in
4 other branches
Acceptance test using saikuro's metric
Signed-off-by: Diego Araújo <diegoamc90@gmail.com>
Showing
3 changed files
with
18 additions
and
3 deletions
Show diff stats
features/repository/show/modules_tree.feature
... | ... | @@ -53,7 +53,7 @@ Feature: Repository modules tree |
53 | 53 | And I click on the sample child's name |
54 | 54 | Then I should see a sample child's name |
55 | 55 | |
56 | - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | |
56 | + @kalibro_configuration_restart @kalibro_processor_restart @javascript | |
57 | 57 | Scenario: Should show modules directories root when the process has been finished |
58 | 58 | Given I am a regular user |
59 | 59 | And I am signed in | ... | ... |
features/step_definitions/metric_configuration_steps.rb
... | ... | @@ -10,13 +10,17 @@ end |
10 | 10 | |
11 | 11 | Given(/^I have a sample configuration with MetricFu metrics$/) do |
12 | 12 | reading_group = FactoryGirl.create(:reading_group) |
13 | - reading = FactoryGirl.create(:reading, {reading_group_id: reading_group.id}) | |
13 | + FactoryGirl.create(:reading, {reading_group_id: reading_group.id}) | |
14 | 14 | |
15 | 15 | @kalibro_configuration = FactoryGirl.create(:kalibro_configuration) |
16 | - metric_configuration = FactoryGirl.create(:metric_configuration, | |
16 | + FactoryGirl.create(:metric_configuration, | |
17 | 17 | {metric: FactoryGirl.build(:pain), |
18 | 18 | reading_group_id: reading_group.id, |
19 | 19 | kalibro_configuration_id: @kalibro_configuration.id}) |
20 | + FactoryGirl.create(:metric_configuration, | |
21 | + {metric: FactoryGirl.build(:saikuro), | |
22 | + reading_group_id: reading_group.id, | |
23 | + kalibro_configuration_id: @kalibro_configuration.id}) | |
20 | 24 | end |
21 | 25 | |
22 | 26 | When(/^I visit the sample metric configuration edit page$/) do | ... | ... |
spec/factories/metrics.rb
... | ... | @@ -32,6 +32,17 @@ FactoryGirl.define do |
32 | 32 | initialize_with { new(name, code, scope, description, languages) } |
33 | 33 | end |
34 | 34 | |
35 | + factory :saikuro, class: KalibroClient::Entities::Miscellaneous::NativeMetric do | |
36 | + name "Cyclomatic Complexity" | |
37 | + code "saikuro" | |
38 | + scope "METHOD" | |
39 | + description nil | |
40 | + languages { [:ruby] } | |
41 | + metric_collector_name "MetricFu" | |
42 | + | |
43 | + initialize_with { new(name, code, scope, description, languages) } | |
44 | + end | |
45 | + | |
35 | 46 | factory :compound_metric, class: KalibroClient::Entities::Miscellaneous::CompoundMetric do |
36 | 47 | name "Compound" |
37 | 48 | code "compound" | ... | ... |