Commit bc18aab85cb0258427846e5118c33e779342b26f
Committed by
Rafael Manzo
1 parent
f4e8e073
Exists in
colab
and in
4 other branches
Minor fixes and removed @wip from repository date select feature
Repository metric results waiting for kalibro configurations integration Signed off by: Daniel Paulino Alves <danpaulalves@gmail.com>
Showing
15 changed files
with
50 additions
and
66 deletions
Show diff stats
app/helpers/kalibro_ranges_helper.rb
| 1 | module KalibroRangesHelper | 1 | module KalibroRangesHelper |
| 2 | - def readings_options(readings) | ||
| 3 | - readings.map { |reading| [reading.label, reading.id] } | ||
| 4 | - end | ||
| 5 | -end | ||
| 6 | \ No newline at end of file | 2 | \ No newline at end of file |
| 3 | + def readings_options(readings) | ||
| 4 | + readings.map { |reading| [reading.label, reading.id] } | ||
| 5 | + end | ||
| 6 | +end |
features/kalibro_range/create.feature
| 1 | -Feature: Create range | ||
| 2 | - In order to be able to create new ranges | 1 | +Feature: Create Kalibro Range |
| 2 | + In order to be able to create new kalibro ranges | ||
| 3 | As a metric specialist | 3 | As a metric specialist |
| 4 | I should be able to fill up a form with its informations and submit it | 4 | I should be able to fill up a form with its informations and submit it |
| 5 | 5 | ||
| 6 | @kalibro_configuration_restart | 6 | @kalibro_configuration_restart |
| 7 | - Scenario: Visiting range creation page when the user own an non-empty reading group | 7 | + Scenario: Visiting kalibro range creation page when the user owns a non-empty reading group |
| 8 | Given I am a regular user | 8 | Given I am a regular user |
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| @@ -20,7 +20,7 @@ Feature: Create range | @@ -20,7 +20,7 @@ Feature: Create range | ||
| 20 | And I should see "Reading" | 20 | And I should see "Reading" |
| 21 | 21 | ||
| 22 | @kalibro_configuration_restart | 22 | @kalibro_configuration_restart |
| 23 | - Scenario: Visiting range creation page when the user don't own the reading group and this reading group is empty | 23 | + Scenario: Visiting kalibro range creation page when the user doesn't own the reading group and this reading group is empty |
| 24 | Given I am a regular user | 24 | Given I am a regular user |
| 25 | And I am signed in | 25 | And I am signed in |
| 26 | And I own a sample configuration | 26 | And I own a sample configuration |
| @@ -36,7 +36,7 @@ Feature: Create range | @@ -36,7 +36,7 @@ Feature: Create range | ||
| 36 | And I should see "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it." | 36 | And I should see "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it." |
| 37 | 37 | ||
| 38 | @kalibro_configuration_restart | 38 | @kalibro_configuration_restart |
| 39 | - Scenario: Visiting range creation page when the user own an empty reading group (testing link to New Reading) | 39 | + Scenario: Visiting kalibro range creation page when the user owns an empty reading group (testing link to New Reading) |
| 40 | Given I am a regular user | 40 | Given I am a regular user |
| 41 | And I am signed in | 41 | And I am signed in |
| 42 | And I own a sample configuration | 42 | And I own a sample configuration |
| @@ -90,7 +90,7 @@ Feature: Create range | @@ -90,7 +90,7 @@ Feature: Create range | ||
| 90 | And I should see "[666.0, 42.0[ is not a valid range" | 90 | And I should see "[666.0, 42.0[ is not a valid range" |
| 91 | 91 | ||
| 92 | @kalibro_configuration_restart | 92 | @kalibro_configuration_restart |
| 93 | - Scenario: With an invalid beggining (not a number) | 93 | + Scenario: With an invalid beginning (not a number) |
| 94 | Given I am a regular user | 94 | Given I am a regular user |
| 95 | And I am signed in | 95 | And I am signed in |
| 96 | And I own a sample configuration | 96 | And I own a sample configuration |
| @@ -143,7 +143,7 @@ Feature: Create range | @@ -143,7 +143,7 @@ Feature: Create range | ||
| 143 | And I should see "Beginning There is already a KalibroRange with beginning 2.0! Please, choose another one." | 143 | And I should see "Beginning There is already a KalibroRange with beginning 2.0! Please, choose another one." |
| 144 | 144 | ||
| 145 | @kalibro_configuration_restart @javascript | 145 | @kalibro_configuration_restart @javascript |
| 146 | - Scenario: Should create range with [-INF, INF] threshold | 146 | + Scenario: Should create a kalibro range with [-INF, INF] threshold |
| 147 | Given I am a regular user | 147 | Given I am a regular user |
| 148 | And I am signed in | 148 | And I am signed in |
| 149 | And I own a sample configuration | 149 | And I own a sample configuration |
| @@ -161,7 +161,7 @@ Feature: Create range | @@ -161,7 +161,7 @@ Feature: Create range | ||
| 161 | And I should see "INF" | 161 | And I should see "INF" |
| 162 | 162 | ||
| 163 | @kalibro_configuration_restart @javascript | 163 | @kalibro_configuration_restart @javascript |
| 164 | - Scenario: Two valid ranges (one with INF) | 164 | + Scenario: Two valid kalibro ranges (one with INF) |
| 165 | Given I am a regular user | 165 | Given I am a regular user |
| 166 | And I am signed in | 166 | And I am signed in |
| 167 | And I own a sample configuration | 167 | And I own a sample configuration |
| @@ -182,4 +182,4 @@ Feature: Create range | @@ -182,4 +182,4 @@ Feature: Create range | ||
| 182 | When I press the Save button | 182 | When I press the Save button |
| 183 | Then I should be at metric configuration sample page | 183 | Then I should be at metric configuration sample page |
| 184 | And I should see "666" | 184 | And I should see "666" |
| 185 | - And I should see "INF" | ||
| 186 | \ No newline at end of file | 185 | \ No newline at end of file |
| 186 | + And I should see "INF" |
features/kalibro_range/deletion.feature
| 1 | -Feature: Range Deletion | ||
| 2 | - In order to be able to remove a range | 1 | +Feature: Kalibro Range Deletion |
| 2 | + In order to be able to remove a kalibro range | ||
| 3 | As a regular user | 3 | As a regular user |
| 4 | The system should have an interface to it | 4 | The system should have an interface to it |
| 5 | 5 | ||
| 6 | @kalibro_configuration_restart | 6 | @kalibro_configuration_restart |
| 7 | - Scenario: Should delete a range that I own | 7 | + Scenario: Should delete a kalibro range that I own |
| 8 | Given I am a regular user | 8 | Given I am a regular user |
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| @@ -18,7 +18,7 @@ Feature: Range Deletion | @@ -18,7 +18,7 @@ Feature: Range Deletion | ||
| 18 | And I should see "There are no Ranges yet!" | 18 | And I should see "There are no Ranges yet!" |
| 19 | 19 | ||
| 20 | @kalibro_configuration_restart | 20 | @kalibro_configuration_restart |
| 21 | - Scenario: Should not see the destroy range link in the range that I not own | 21 | + Scenario: Should not see the destroy kalibro range link in the kalibro range that I do not own |
| 22 | Given I am a regular user | 22 | Given I am a regular user |
| 23 | And I am signed in | 23 | And I am signed in |
| 24 | And I have a sample configuration | 24 | And I have a sample configuration |
features/kalibro_range/edit.feature
| 1 | Feature: Kalibro Range Edit | 1 | Feature: Kalibro Range Edit |
| 2 | - In Order to be able to update my kalibro range info | 2 | + In order to be able to update my kalibro range info |
| 3 | As a regular user | 3 | As a regular user |
| 4 | I should be able to edit my kalibro ranges | 4 | I should be able to edit my kalibro ranges |
| 5 | 5 |
features/repository/show/date_select.feature
| @@ -3,12 +3,13 @@ Feature: Date Select | @@ -3,12 +3,13 @@ Feature: Date Select | ||
| 3 | As a regular user | 3 | As a regular user |
| 4 | I should be able to select a specific date | 4 | I should be able to select a specific date |
| 5 | 5 | ||
| 6 | - @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | 6 | + @kalibro_configuration_restart @kalibro_processor_restart @javascript |
| 7 | Scenario: With a specific date selected | 7 | Scenario: With a specific date selected |
| 8 | Given I have a sample project | 8 | Given I have a sample project |
| 9 | And I have a sample configuration with native metrics | 9 | And I have a sample configuration with native metrics |
| 10 | And I have a sample repository within the sample project | 10 | And I have a sample repository within the sample project |
| 11 | And I start to process that repository | 11 | And I start to process that repository |
| 12 | + And I wait for "60" seconds | ||
| 12 | And I wait up for a ready processing | 13 | And I wait up for a ready processing |
| 13 | And I start to process that repository | 14 | And I start to process that repository |
| 14 | And I wait up for the last processing to get ready | 15 | And I wait up for the last processing to get ready |
| @@ -18,11 +19,10 @@ Feature: Date Select | @@ -18,11 +19,10 @@ Feature: Date Select | ||
| 18 | And I set the select field "month" as "1" | 19 | And I set the select field "month" as "1" |
| 19 | And I set the select field "year" as "2013" | 20 | And I set the select field "year" as "2013" |
| 20 | And I press the Search button | 21 | And I press the Search button |
| 21 | - And I wait for "60" seconds | ||
| 22 | And I get the Creation date information as "before" | 22 | And I get the Creation date information as "before" |
| 23 | When I set the select field "day" as "1" | 23 | When I set the select field "day" as "1" |
| 24 | And I set the select field "month" as "1" | 24 | And I set the select field "month" as "1" |
| 25 | And I set the select field "year" as "2020" | 25 | And I set the select field "year" as "2020" |
| 26 | And I press the Search button | 26 | And I press the Search button |
| 27 | And I get the Creation date information as "after" | 27 | And I get the Creation date information as "after" |
| 28 | - Then "before" should be less than "after" | ||
| 29 | \ No newline at end of file | 28 | \ No newline at end of file |
| 29 | + Then "before" should be lesser than "after" |
features/repository/show/metric_results.feature
| @@ -4,7 +4,7 @@ Feature: Repository metric results | @@ -4,7 +4,7 @@ Feature: Repository metric results | ||
| 4 | I should see the metric results table with its graphics | 4 | I should see the metric results table with its graphics |
| 5 | 5 | ||
| 6 | @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip | 6 | @kalibro_configuration_restart @kalibro_processor_restart @javascript @wip |
| 7 | - Scenario: Should show the message when the graphic of the given metric have only a single point | 7 | + Scenario: Should show the message when the graphic of the given metric has only a single point |
| 8 | Given I am a regular user | 8 | Given I am a regular user |
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I have a sample project | 10 | And I have a sample project |
| @@ -24,7 +24,7 @@ Feature: Repository metric results | @@ -24,7 +24,7 @@ Feature: Repository metric results | ||
| 24 | Then I should see "There is only one point and it will not be printed into a chart." | 24 | Then I should see "There is only one point and it will not be printed into a chart." |
| 25 | 25 | ||
| 26 | @kalibro_configuration_restart @kalibro_processor_restart @javascript | 26 | @kalibro_configuration_restart @kalibro_processor_restart @javascript |
| 27 | - Scenario: Should show the no range message after a process without range | 27 | + Scenario: Should show no range message after a process without range |
| 28 | Given I am a regular user | 28 | Given I am a regular user |
| 29 | And I am signed in | 29 | And I am signed in |
| 30 | And I have a sample project | 30 | And I have a sample project |
features/step_definitions/repository_steps.rb
| @@ -41,36 +41,20 @@ Given(/^I start to process that repository$/) do | @@ -41,36 +41,20 @@ Given(/^I start to process that repository$/) do | ||
| 41 | end | 41 | end |
| 42 | 42 | ||
| 43 | Given(/^I wait up for a ready processing$/) do | 43 | Given(/^I wait up for a ready processing$/) do |
| 44 | - unless Processing.has_ready_processing(@repository.id) | ||
| 45 | - while(true) | ||
| 46 | - if Processing.has_ready_processing(@repository.id) | ||
| 47 | - break | ||
| 48 | - else | ||
| 49 | - sleep(10) | ||
| 50 | - end | ||
| 51 | - end | 44 | + while !Processing.has_ready_processing(@repository.id) |
| 45 | + sleep(10) | ||
| 52 | end | 46 | end |
| 53 | end | 47 | end |
| 54 | 48 | ||
| 55 | Given(/^I wait up for the last processing to get ready$/) do | 49 | Given(/^I wait up for the last processing to get ready$/) do |
| 56 | - while(true) | ||
| 57 | - if Processing.last_processing_of(@repository.id).state == "READY" | ||
| 58 | - break | ||
| 59 | - else | ||
| 60 | - sleep(10) | ||
| 61 | - end | 50 | + while Processing.last_processing_of(@repository.id).state != "READY" |
| 51 | + sleep(10) | ||
| 62 | end | 52 | end |
| 63 | end | 53 | end |
| 64 | 54 | ||
| 65 | Given(/^I wait up for a error processing$/) do | 55 | Given(/^I wait up for a error processing$/) do |
| 66 | - unless Processing.last_processing_state_of(@repository.id) == "ERROR" | ||
| 67 | - while(true) | ||
| 68 | - if Processing.last_processing_state_of(@repository.id) == "ERROR" | ||
| 69 | - break | ||
| 70 | - else | ||
| 71 | - sleep(10) | ||
| 72 | - end | ||
| 73 | - end | 56 | + while Processing.last_processing_state_of(@repository.id) != "ERROR" |
| 57 | + sleep(10) | ||
| 74 | end | 58 | end |
| 75 | end | 59 | end |
| 76 | 60 | ||
| @@ -183,7 +167,7 @@ Then(/^I should see the saved repository's content$/) do | @@ -183,7 +167,7 @@ Then(/^I should see the saved repository's content$/) do | ||
| 183 | expect(page).to have_content(@kalibro_configuration.name) | 167 | expect(page).to have_content(@kalibro_configuration.name) |
| 184 | end | 168 | end |
| 185 | 169 | ||
| 186 | -Then(/^"(.*?)" should be less than "(.*?)"$/) do |arg1, arg2| | 170 | +Then(/^"(.*?)" should be lesser than "(.*?)"$/) do |arg1, arg2| |
| 187 | v1 = eval "@#{arg1}" | 171 | v1 = eval "@#{arg1}" |
| 188 | v2 = eval "@#{arg2}" | 172 | v2 = eval "@#{arg2}" |
| 189 | 173 |
spec/controllers/base_metric_configurations_controller_spec.rb
| @@ -75,7 +75,7 @@ describe InheritsFromBaseMetricConfigurationsController, :type => :controller do | @@ -75,7 +75,7 @@ describe InheritsFromBaseMetricConfigurationsController, :type => :controller do | ||
| 75 | it { is_expected.to respond_with(:success) } | 75 | it { is_expected.to respond_with(:success) } |
| 76 | end | 76 | end |
| 77 | 77 | ||
| 78 | - context "when the current user doesn't owns the kalibro configuration" do | 78 | + context "when the current user doesn't own the kalibro configuration" do |
| 79 | before :each do | 79 | before :each do |
| 80 | get :new, kalibro_configuration_id: kalibro_configuration.id | 80 | get :new, kalibro_configuration_id: kalibro_configuration.id |
| 81 | end | 81 | end |
spec/controllers/compound_metric_configurations_controller_spec.rb
| @@ -20,7 +20,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do | @@ -20,7 +20,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do | ||
| 20 | it { is_expected.to render_template(:new) } | 20 | it { is_expected.to render_template(:new) } |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | - context "when the current user doesn't owns the kalibro configuration" do | 23 | + context "when the current user doesn't own the kalibro configuration" do |
| 24 | before :each do | 24 | before :each do |
| 25 | get :new, kalibro_configuration_id: kalibro_configuration.id | 25 | get :new, kalibro_configuration_id: kalibro_configuration.id |
| 26 | end | 26 | end |
| @@ -88,7 +88,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do | @@ -88,7 +88,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do | ||
| 88 | describe 'edit' do | 88 | describe 'edit' do |
| 89 | let(:compound_metric_configuration) { FactoryGirl.build(:compound_metric_configuration_with_id) } | 89 | let(:compound_metric_configuration) { FactoryGirl.build(:compound_metric_configuration_with_id) } |
| 90 | 90 | ||
| 91 | - context 'with an User logged in' do | 91 | + context 'with a User logged in' do |
| 92 | before do | 92 | before do |
| 93 | sign_in FactoryGirl.create(:user) | 93 | sign_in FactoryGirl.create(:user) |
| 94 | end | 94 | end |
spec/controllers/kalibro_ranges_controller_spec.rb
| @@ -23,7 +23,7 @@ describe KalibroRangesController, :type => :controller do | @@ -23,7 +23,7 @@ describe KalibroRangesController, :type => :controller do | ||
| 23 | it { is_expected.to render_template(:new) } | 23 | it { is_expected.to render_template(:new) } |
| 24 | end | 24 | end |
| 25 | 25 | ||
| 26 | - context "when the current user doesn't owns the metric configuration" do | 26 | + context "when the current user doesn't own the metric configuration" do |
| 27 | before :each do | 27 | before :each do |
| 28 | get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id | 28 | get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id |
| 29 | end | 29 | end |
| @@ -41,7 +41,7 @@ describe KalibroRangesController, :type => :controller do | @@ -41,7 +41,7 @@ describe KalibroRangesController, :type => :controller do | ||
| 41 | sign_in FactoryGirl.create(:user) | 41 | sign_in FactoryGirl.create(:user) |
| 42 | end | 42 | end |
| 43 | 43 | ||
| 44 | - context 'when the current user owns the mezuro range' do | 44 | + context 'when the current user owns the kalibro range' do |
| 45 | before :each do | 45 | before :each do |
| 46 | subject.expects(:metric_configuration_owner?).returns true | 46 | subject.expects(:metric_configuration_owner?).returns true |
| 47 | end | 47 | end |
| @@ -113,12 +113,12 @@ describe KalibroRangesController, :type => :controller do | @@ -113,12 +113,12 @@ describe KalibroRangesController, :type => :controller do | ||
| 113 | let(:kalibro_range) { FactoryGirl.build(:kalibro_range_with_id, metric_configuration_id: metric_configuration.id) } | 113 | let(:kalibro_range) { FactoryGirl.build(:kalibro_range_with_id, metric_configuration_id: metric_configuration.id) } |
| 114 | let(:reading) { FactoryGirl.build(:reading_with_id, reading_group_id: metric_configuration.reading_group_id) } | 114 | let(:reading) { FactoryGirl.build(:reading_with_id, reading_group_id: metric_configuration.reading_group_id) } |
| 115 | 115 | ||
| 116 | - context 'with an User logged in' do | 116 | + context 'with a User logged in' do |
| 117 | before do | 117 | before do |
| 118 | sign_in FactoryGirl.create(:user) | 118 | sign_in FactoryGirl.create(:user) |
| 119 | end | 119 | end |
| 120 | 120 | ||
| 121 | - context 'when the user owns the mezuro range' do | 121 | + context 'when the user owns the kalibro range' do |
| 122 | before :each do | 122 | before :each do |
| 123 | subject.expects(:metric_configuration_owner?).returns true | 123 | subject.expects(:metric_configuration_owner?).returns true |
| 124 | subject.expects(:find_resource).with(KalibroRange, kalibro_range.id).returns(kalibro_range) | 124 | subject.expects(:find_resource).with(KalibroRange, kalibro_range.id).returns(kalibro_range) |
| @@ -130,7 +130,7 @@ describe KalibroRangesController, :type => :controller do | @@ -130,7 +130,7 @@ describe KalibroRangesController, :type => :controller do | ||
| 130 | it { is_expected.to render_template(:edit) } | 130 | it { is_expected.to render_template(:edit) } |
| 131 | end | 131 | end |
| 132 | 132 | ||
| 133 | - context 'when the user does not own the mezuro range' do | 133 | + context 'when the user does not own the kalibro range' do |
| 134 | let!(:reading_group) { FactoryGirl.build(:reading_group, id: metric_configuration.reading_group_id) } | 134 | let!(:reading_group) { FactoryGirl.build(:reading_group, id: metric_configuration.reading_group_id) } |
| 135 | 135 | ||
| 136 | before do | 136 | before do |
| @@ -163,7 +163,7 @@ describe KalibroRangesController, :type => :controller do | @@ -163,7 +163,7 @@ describe KalibroRangesController, :type => :controller do | ||
| 163 | sign_in FactoryGirl.create(:user) | 163 | sign_in FactoryGirl.create(:user) |
| 164 | end | 164 | end |
| 165 | 165 | ||
| 166 | - context 'when user owns the mezuro range' do | 166 | + context 'when user owns the kalibro range' do |
| 167 | before :each do | 167 | before :each do |
| 168 | subject.expects(:metric_configuration_owner?).returns true | 168 | subject.expects(:metric_configuration_owner?).returns true |
| 169 | end | 169 | end |
| @@ -194,7 +194,7 @@ describe KalibroRangesController, :type => :controller do | @@ -194,7 +194,7 @@ describe KalibroRangesController, :type => :controller do | ||
| 194 | end | 194 | end |
| 195 | end | 195 | end |
| 196 | 196 | ||
| 197 | - context 'when the user does not own the mezuro range' do | 197 | + context 'when the user does not own the kalibro range' do |
| 198 | before :each do | 198 | before :each do |
| 199 | post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params | 199 | post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params |
| 200 | end | 200 | end |
spec/controllers/metric_configurations_controller_spec.rb
| 1 | require 'rails_helper' | 1 | require 'rails_helper' |
| 2 | 2 | ||
| 3 | describe MetricConfigurationsController, :type => :controller do | 3 | describe MetricConfigurationsController, :type => :controller do |
| 4 | - let!(:kalibro_configuration) { FactoryGirl.build(:kalibro_configuration_with_id) } | 4 | + let(:kalibro_configuration) { FactoryGirl.build(:kalibro_configuration_with_id) } |
| 5 | describe 'choose_metric' do | 5 | describe 'choose_metric' do |
| 6 | let(:metric_collector) { FactoryGirl.build(:metric_collector) } | 6 | let(:metric_collector) { FactoryGirl.build(:metric_collector) } |
| 7 | before :each do | 7 | before :each do |
| @@ -40,7 +40,7 @@ describe MetricConfigurationsController, :type => :controller do | @@ -40,7 +40,7 @@ describe MetricConfigurationsController, :type => :controller do | ||
| 40 | it { is_expected.to render_template(:new) } | 40 | it { is_expected.to render_template(:new) } |
| 41 | end | 41 | end |
| 42 | 42 | ||
| 43 | - context "when the current user doesn't owns the kalibro configuration" do | 43 | + context "when the current user doesn't own the kalibro configuration" do |
| 44 | before :each do | 44 | before :each do |
| 45 | post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name | 45 | post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name |
| 46 | end | 46 | end |
| @@ -109,7 +109,7 @@ describe MetricConfigurationsController, :type => :controller do | @@ -109,7 +109,7 @@ describe MetricConfigurationsController, :type => :controller do | ||
| 109 | describe 'edit' do | 109 | describe 'edit' do |
| 110 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } | 110 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } |
| 111 | 111 | ||
| 112 | - context 'with an User logged in' do | 112 | + context 'with a User logged in' do |
| 113 | before do | 113 | before do |
| 114 | sign_in FactoryGirl.create(:user) | 114 | sign_in FactoryGirl.create(:user) |
| 115 | end | 115 | end |
| @@ -196,7 +196,7 @@ describe MetricConfigurationsController, :type => :controller do | @@ -196,7 +196,7 @@ describe MetricConfigurationsController, :type => :controller do | ||
| 196 | describe 'destroy' do | 196 | describe 'destroy' do |
| 197 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } | 197 | let(:metric_configuration) { FactoryGirl.build(:metric_configuration_with_id) } |
| 198 | 198 | ||
| 199 | - context 'with an User logged in' do | 199 | + context 'with a User logged in' do |
| 200 | before do | 200 | before do |
| 201 | sign_in FactoryGirl.create(:user) | 201 | sign_in FactoryGirl.create(:user) |
| 202 | end | 202 | end |
spec/controllers/projects_controller_spec.rb
| @@ -88,7 +88,7 @@ describe ProjectsController, :type => :controller do | @@ -88,7 +88,7 @@ describe ProjectsController, :type => :controller do | ||
| 88 | @subject = FactoryGirl.build(:project_with_id) | 88 | @subject = FactoryGirl.build(:project_with_id) |
| 89 | end | 89 | end |
| 90 | 90 | ||
| 91 | - context 'with an User logged in' do | 91 | + context 'with a User logged in' do |
| 92 | before do | 92 | before do |
| 93 | sign_in FactoryGirl.create(:user) | 93 | sign_in FactoryGirl.create(:user) |
| 94 | @ownership = FactoryGirl.build(:project_ownership) | 94 | @ownership = FactoryGirl.build(:project_ownership) |
spec/controllers/reading_groups_controller_spec.rb
| @@ -74,7 +74,7 @@ describe ReadingGroupsController, :type => :controller do | @@ -74,7 +74,7 @@ describe ReadingGroupsController, :type => :controller do | ||
| 74 | @subject = FactoryGirl.build(:reading_group_with_id) | 74 | @subject = FactoryGirl.build(:reading_group_with_id) |
| 75 | end | 75 | end |
| 76 | 76 | ||
| 77 | - context 'with an User logged in' do | 77 | + context 'with a User logged in' do |
| 78 | before do | 78 | before do |
| 79 | sign_in FactoryGirl.create(:user) | 79 | sign_in FactoryGirl.create(:user) |
| 80 | @ownership = FactoryGirl.build(:reading_group_ownership) | 80 | @ownership = FactoryGirl.build(:reading_group_ownership) |
| @@ -140,7 +140,7 @@ describe ReadingGroupsController, :type => :controller do | @@ -140,7 +140,7 @@ describe ReadingGroupsController, :type => :controller do | ||
| 140 | @subject = FactoryGirl.build(:reading_group_with_id) | 140 | @subject = FactoryGirl.build(:reading_group_with_id) |
| 141 | end | 141 | end |
| 142 | 142 | ||
| 143 | - context 'with an User logged in' do | 143 | + context 'with a User logged in' do |
| 144 | before do | 144 | before do |
| 145 | @user = FactoryGirl.create(:user) | 145 | @user = FactoryGirl.create(:user) |
| 146 | @ownership = FactoryGirl.build(:reading_group_ownership) | 146 | @ownership = FactoryGirl.build(:reading_group_ownership) |
spec/controllers/readings_controller_spec.rb
| @@ -66,7 +66,7 @@ describe ReadingsController, :type => :controller do | @@ -66,7 +66,7 @@ describe ReadingsController, :type => :controller do | ||
| 66 | describe 'edit' do | 66 | describe 'edit' do |
| 67 | let(:reading) { FactoryGirl.build(:reading_with_id) } | 67 | let(:reading) { FactoryGirl.build(:reading_with_id) } |
| 68 | 68 | ||
| 69 | - context 'with an User logged in' do | 69 | + context 'with a User logged in' do |
| 70 | before do | 70 | before do |
| 71 | sign_in FactoryGirl.create(:user) | 71 | sign_in FactoryGirl.create(:user) |
| 72 | end | 72 | end |
| @@ -160,7 +160,7 @@ describe ReadingsController, :type => :controller do | @@ -160,7 +160,7 @@ describe ReadingsController, :type => :controller do | ||
| 160 | describe 'destroy' do | 160 | describe 'destroy' do |
| 161 | let(:reading) { FactoryGirl.build(:reading_with_id) } | 161 | let(:reading) { FactoryGirl.build(:reading_with_id) } |
| 162 | 162 | ||
| 163 | - context 'with an User logged in' do | 163 | + context 'with a User logged in' do |
| 164 | before do | 164 | before do |
| 165 | sign_in FactoryGirl.create(:user) | 165 | sign_in FactoryGirl.create(:user) |
| 166 | end | 166 | end |
spec/controllers/repositories_controller_spec.rb
| @@ -4,7 +4,7 @@ describe RepositoriesController, :type => :controller do | @@ -4,7 +4,7 @@ describe RepositoriesController, :type => :controller do | ||
| 4 | let(:project) { FactoryGirl.build(:project_with_id) } | 4 | let(:project) { FactoryGirl.build(:project_with_id) } |
| 5 | 5 | ||
| 6 | describe 'new' do | 6 | describe 'new' do |
| 7 | - context 'with an User logged in' do | 7 | + context 'with a User logged in' do |
| 8 | before :each do | 8 | before :each do |
| 9 | sign_in FactoryGirl.create(:user) | 9 | sign_in FactoryGirl.create(:user) |
| 10 | end | 10 | end |