Commit 18476f8b64ed3e6dc9909fbfb7d9fc9b66e3d4b5
Committed by
Diego Camarinha
1 parent
c99fce96
Exists in
colab
and in
4 other branches
Fixed compound and metric configuration tests
Signed off by: Daniel Alves <danpaulalves@gmail.com>
Showing
9 changed files
with
15 additions
and
15 deletions
Show diff stats
features/compound_metric_configuration/edition.feature
@@ -59,5 +59,5 @@ Feature: Compound Metric Configuration edition | @@ -59,5 +59,5 @@ Feature: Compound Metric Configuration edition | ||
59 | When I visit the sample compound metric configuration edit page | 59 | When I visit the sample compound metric configuration edit page |
60 | And I fill the Code field with "Another_Code" | 60 | And I fill the Code field with "Another_Code" |
61 | And I press the Save button | 61 | And I press the Save button |
62 | - Then I should see "Code There's already" | 62 | + Then I should see "Code There is already a MetricConfiguration with code Another_Code! Please, choose another one." |
63 | 63 |
features/metric_configuration/delete.feature
@@ -12,7 +12,7 @@ Feature: Metric Configuration Deletion | @@ -12,7 +12,7 @@ Feature: Metric Configuration Deletion | ||
12 | And I have a sample metric configuration within the given mezuro configuration | 12 | And I have a sample metric configuration within the given mezuro configuration |
13 | When I am at the Sample Configuration page | 13 | When I am at the Sample Configuration page |
14 | And I click the Destroy link | 14 | And I click the Destroy link |
15 | - Then I should see "There are no metric configurations yet!" | 15 | + Then I should see "There are no Metric Configurations yet!" |
16 | 16 | ||
17 | @kalibro_restart | 17 | @kalibro_restart |
18 | Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own | 18 | Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own |
@@ -22,4 +22,4 @@ Feature: Metric Configuration Deletion | @@ -22,4 +22,4 @@ Feature: Metric Configuration Deletion | ||
22 | And I have a sample reading group | 22 | And I have a sample reading group |
23 | And I have a sample metric configuration within the given mezuro configuration | 23 | And I have a sample metric configuration within the given mezuro configuration |
24 | When I am at the Sample Configuration page | 24 | When I am at the Sample Configuration page |
25 | - Then I should not see "Destroy" | ||
26 | \ No newline at end of file | 25 | \ No newline at end of file |
26 | + Then I should not see "Destroy" |
features/metric_configuration/listing.feature
@@ -4,13 +4,13 @@ Feature: Configuration listing | @@ -4,13 +4,13 @@ Feature: Configuration listing | ||
4 | I should see the metric configurations of a given configuration | 4 | I should see the metric configurations of a given configuration |
5 | 5 | ||
6 | @kalibro_restart | 6 | @kalibro_restart |
7 | - Scenario: When there is no metric configurations | 7 | + Scenario: When there are no metric configurations |
8 | Given I have a sample configuration | 8 | Given I have a sample configuration |
9 | When I am at the Sample Configuration page | 9 | When I am at the Sample Configuration page |
10 | Then I should see "Metric Name" | 10 | Then I should see "Metric Name" |
11 | And I should see "Code" | 11 | And I should see "Code" |
12 | And I should see "Weight" | 12 | And I should see "Weight" |
13 | - And I should see "There are no metric configurations yet!" | 13 | + And I should see "There are no Metric Configurations yet!" |
14 | 14 | ||
15 | @kalibro_restart | 15 | @kalibro_restart |
16 | Scenario: When there are metric configurations | 16 | Scenario: When there are metric configurations |
@@ -34,4 +34,4 @@ Feature: Configuration listing | @@ -34,4 +34,4 @@ Feature: Configuration listing | ||
34 | And I am signed in | 34 | And I am signed in |
35 | And I have a sample configuration | 35 | And I have a sample configuration |
36 | When I am at the Sample Configuration page | 36 | When I am at the Sample Configuration page |
37 | - Then I should not see Add Metric link | ||
38 | \ No newline at end of file | 37 | \ No newline at end of file |
38 | + Then I should not see Add Metric link |
features/step_definitions/metric_configuration_steps.rb
@@ -38,5 +38,5 @@ Then(/^I should be at metric configuration sample page$/) do | @@ -38,5 +38,5 @@ Then(/^I should be at metric configuration sample page$/) do | ||
38 | end | 38 | end |
39 | 39 | ||
40 | Then(/^I should be at the choose metric page$/) do | 40 | Then(/^I should be at the choose metric page$/) do |
41 | - expect(page).to have_content("Choose a metric from a base tool:") | 41 | + expect(page).to have_content("Choose a metric from a Base Tool:") |
42 | end | 42 | end |
spec/models/validators/beginning_uniqueness_validator_spec.rb
@@ -28,7 +28,7 @@ describe BeginningUniquenessValidator, :type => :model do | @@ -28,7 +28,7 @@ describe BeginningUniquenessValidator, :type => :model do | ||
28 | 28 | ||
29 | it 'should contain errors' do | 29 | it 'should contain errors' do |
30 | @subject.save | 30 | @subject.save |
31 | - expect(@subject.errors[:beginning]).to eq(["There's already a MezuroRange with beginning #{@subject.beginning}! Please, choose another one."]) | 31 | + expect(@subject.errors[:beginning]).to eq(["There is already a MezuroRange with beginning #{@subject.beginning}! Please, choose another one."]) |
32 | end | 32 | end |
33 | end | 33 | end |
34 | end | 34 | end |
spec/models/validators/code_uniqueness_validator_spec.rb
@@ -24,9 +24,9 @@ describe CodeUniquenessValidator, :type => :model do | @@ -24,9 +24,9 @@ describe CodeUniquenessValidator, :type => :model do | ||
24 | 24 | ||
25 | it 'should contain errors' do | 25 | it 'should contain errors' do |
26 | @subject.save | 26 | @subject.save |
27 | - expect(@subject.errors[:code]).to eq(["There's already a MetricConfiguration with code #{@subject.code}! Please, choose another one."]) | 27 | + expect(@subject.errors[:code]).to eq(["There is already a MetricConfiguration with code #{@subject.code}! Please, choose another one."]) |
28 | end | 28 | end |
29 | end | 29 | end |
30 | end | 30 | end |
31 | end | 31 | end |
32 | -end | ||
33 | \ No newline at end of file | 32 | \ No newline at end of file |
33 | +end |
spec/models/validators/greater_than_beginning_validator_spec.rb
@@ -11,7 +11,7 @@ describe GreaterThanBeginningValidator, :type => :model do | @@ -11,7 +11,7 @@ describe GreaterThanBeginningValidator, :type => :model do | ||
11 | subject { FactoryGirl.build(:mezuro_range, end: "-INF") } | 11 | subject { FactoryGirl.build(:mezuro_range, end: "-INF") } |
12 | it 'is expected to return an error' do | 12 | it 'is expected to return an error' do |
13 | subject.save | 13 | subject.save |
14 | - expect(subject.errors[:end]).to eq(["The end value should be greater than the beginning value."]) | 14 | + expect(subject.errors[:end]).to eq(["The End value should be greater than the Beginning value."]) |
15 | end | 15 | end |
16 | end | 16 | end |
17 | context 'when beginning is -INF or end is INF' do | 17 | context 'when beginning is -INF or end is INF' do |
@@ -25,7 +25,7 @@ describe GreaterThanBeginningValidator, :type => :model do | @@ -25,7 +25,7 @@ describe GreaterThanBeginningValidator, :type => :model do | ||
25 | subject { FactoryGirl.build(:mezuro_range, beginning: 1.0, end: 0.0) } | 25 | subject { FactoryGirl.build(:mezuro_range, beginning: 1.0, end: 0.0) } |
26 | it 'is expected to return an error' do | 26 | it 'is expected to return an error' do |
27 | subject.save | 27 | subject.save |
28 | - expect(subject.errors[:end]).to eq(["The end value should be greater than the beginning value."]) | 28 | + expect(subject.errors[:end]).to eq(["The End value should be greater than the Beginning value."]) |
29 | end | 29 | end |
30 | end | 30 | end |
31 | context 'when beginning is smaller than end' do | 31 | context 'when beginning is smaller than end' do |
spec/models/validators/kalibro_uniqueness_validator_spec.rb
@@ -24,9 +24,9 @@ describe KalibroUniquenessValidator, :type => :model do | @@ -24,9 +24,9 @@ describe KalibroUniquenessValidator, :type => :model do | ||
24 | 24 | ||
25 | it 'should contain errors' do | 25 | it 'should contain errors' do |
26 | @subject.save | 26 | @subject.save |
27 | - expect(@subject.errors[:name]).to eq(["There's already a Project with name #{@subject.name}! Please, choose another one."]) | 27 | + expect(@subject.errors[:name]).to eq(["There is already a Project with name #{@subject.name}! Please, choose another one."]) |
28 | end | 28 | end |
29 | end | 29 | end |
30 | end | 30 | end |
31 | end | 31 | end |
32 | -end | ||
33 | \ No newline at end of file | 32 | \ No newline at end of file |
33 | +end |
spec/models/validators/range_overlapping_validator_spec.rb
@@ -34,7 +34,7 @@ describe RangeOverlappingValidator, :type => :model do | @@ -34,7 +34,7 @@ describe RangeOverlappingValidator, :type => :model do | ||
34 | 34 | ||
35 | it 'is expected to return errors' do | 35 | it 'is expected to return errors' do |
36 | range.save | 36 | range.save |
37 | - expect(range.errors[:beginning]).to eq(["There's already a #{range.class} within these boundaries! Please, choose another ones."]) | 37 | + expect(range.errors[:beginning]).to eq(["There is already a #{range.class} within these boundaries! Please, choose another interval."]) |
38 | end | 38 | end |
39 | end | 39 | end |
40 | end | 40 | end |