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 | 59 | When I visit the sample compound metric configuration edit page |
| 60 | 60 | And I fill the Code field with "Another_Code" |
| 61 | 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 | 12 | And I have a sample metric configuration within the given mezuro configuration |
| 13 | 13 | When I am at the Sample Configuration page |
| 14 | 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 | 17 | @kalibro_restart |
| 18 | 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 | 22 | And I have a sample reading group |
| 23 | 23 | And I have a sample metric configuration within the given mezuro configuration |
| 24 | 24 | When I am at the Sample Configuration page |
| 25 | - Then I should not see "Destroy" | |
| 26 | 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 | 4 | I should see the metric configurations of a given configuration |
| 5 | 5 | |
| 6 | 6 | @kalibro_restart |
| 7 | - Scenario: When there is no metric configurations | |
| 7 | + Scenario: When there are no metric configurations | |
| 8 | 8 | Given I have a sample configuration |
| 9 | 9 | When I am at the Sample Configuration page |
| 10 | 10 | Then I should see "Metric Name" |
| 11 | 11 | And I should see "Code" |
| 12 | 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 | 15 | @kalibro_restart |
| 16 | 16 | Scenario: When there are metric configurations |
| ... | ... | @@ -34,4 +34,4 @@ Feature: Configuration listing |
| 34 | 34 | And I am signed in |
| 35 | 35 | And I have a sample configuration |
| 36 | 36 | When I am at the Sample Configuration page |
| 37 | - Then I should not see Add Metric link | |
| 38 | 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 | 38 | end |
| 39 | 39 | |
| 40 | 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 | 42 | end | ... | ... |
spec/models/validators/beginning_uniqueness_validator_spec.rb
| ... | ... | @@ -28,7 +28,7 @@ describe BeginningUniquenessValidator, :type => :model do |
| 28 | 28 | |
| 29 | 29 | it 'should contain errors' do |
| 30 | 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 | 32 | end |
| 33 | 33 | end |
| 34 | 34 | end | ... | ... |
spec/models/validators/code_uniqueness_validator_spec.rb
| ... | ... | @@ -24,9 +24,9 @@ describe CodeUniquenessValidator, :type => :model do |
| 24 | 24 | |
| 25 | 25 | it 'should contain errors' do |
| 26 | 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 | 28 | end |
| 29 | 29 | end |
| 30 | 30 | end |
| 31 | 31 | end |
| 32 | -end | |
| 33 | 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 | 11 | subject { FactoryGirl.build(:mezuro_range, end: "-INF") } |
| 12 | 12 | it 'is expected to return an error' do |
| 13 | 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 | 15 | end |
| 16 | 16 | end |
| 17 | 17 | context 'when beginning is -INF or end is INF' do |
| ... | ... | @@ -25,7 +25,7 @@ describe GreaterThanBeginningValidator, :type => :model do |
| 25 | 25 | subject { FactoryGirl.build(:mezuro_range, beginning: 1.0, end: 0.0) } |
| 26 | 26 | it 'is expected to return an error' do |
| 27 | 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 | 29 | end |
| 30 | 30 | end |
| 31 | 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 | 24 | |
| 25 | 25 | it 'should contain errors' do |
| 26 | 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 | 28 | end |
| 29 | 29 | end |
| 30 | 30 | end |
| 31 | 31 | end |
| 32 | -end | |
| 33 | 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 | 34 | |
| 35 | 35 | it 'is expected to return errors' do |
| 36 | 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 | 38 | end |
| 39 | 39 | end |
| 40 | 40 | end | ... | ... |