diff --git a/spec/lib/remote_translations/microsoft/client_spec.rb b/spec/lib/remote_translations/microsoft/client_spec.rb index 0b9b4c731..3a796f476 100644 --- a/spec/lib/remote_translations/microsoft/client_spec.rb +++ b/spec/lib/remote_translations/microsoft/client_spec.rb @@ -27,7 +27,7 @@ describe RemoteTranslations::Microsoft::Client do end context "when characters from request are greater than characters limit" do - it "response has the expected result when the request has 2 texts, where both less than CHARACTERS_LIMIT_PER_REQUEST" do + it "has the expected result when the request has two texts and both are smaller than the limit" do stub_const("RemoteTranslations::Microsoft::Client::CHARACTERS_LIMIT_PER_REQUEST", 20) text_en = Faker::Lorem.characters(number: 11) another_text_en = Faker::Lorem.characters(number: 11) @@ -49,7 +49,7 @@ describe RemoteTranslations::Microsoft::Client do expect(result).to eq([translated_text_es, another_translated_text_es]) end - it "response has the expected result when the request has 2 texts and both are greater than CHARACTERS_LIMIT_PER_REQUEST" do + it "has the expected result when the request has two texts and both are greater than the limit" do stub_const("RemoteTranslations::Microsoft::Client::CHARACTERS_LIMIT_PER_REQUEST", 20) start_text_en = Faker::Lorem.characters(number: 10) + " " end_text_en = Faker::Lorem.characters(number: 10) diff --git a/spec/models/budget/investment_spec.rb b/spec/models/budget/investment_spec.rb index 7dede4c03..d0a754158 100644 --- a/spec/models/budget/investment_spec.rb +++ b/spec/models/budget/investment_spec.rb @@ -1311,7 +1311,7 @@ describe Budget::Investment do end describe "check_for_reclassification" do - it "stores reclassfied votes and removes actual votes if an investment has been reclassified" do + it "removes votes and stores reclassfied votes if an investment has been reclassified" do investment = create(:budget_investment, :selected, heading: heading1) 3.times { create(:user, ballot_lines: [investment]) } @@ -1326,7 +1326,7 @@ describe Budget::Investment do expect(Budget::ReclassifiedVote.count).to eq(3) end - it "does not store reclassified votes nor remove actual votes if the investment has not been reclassifed" do + it "does not remove votes nor store reclassified votes if the investment has not been reclassifed" do investment = create(:budget_investment, :selected, heading: heading1) 3.times { create(:user, ballot_lines: [investment]) } diff --git a/spec/models/tenant_spec.rb b/spec/models/tenant_spec.rb index ba94f001a..1e7cda5a7 100644 --- a/spec/models/tenant_spec.rb +++ b/spec/models/tenant_spec.rb @@ -135,7 +135,7 @@ describe Tenant do expect { Tenant.resolve_host("www.consul.dev") }.to raise_exception(Apartment::TenantNotFound) end - it "raises an exception when accessing a hidden tenant with a domain and another tenant resolves to the same domain" do + it "raises an exception with a hidden tenant's domain when another tenant resolves to the same domain" do insert(:tenant, :domain, schema: "saturn.consul.dev", hidden_at: Time.current) insert(:tenant, schema: "saturn") diff --git a/spec/shared/system/nested_imageable.rb b/spec/shared/system/nested_imageable.rb index f82b66abb..be2588f31 100644 --- a/spec/shared/system/nested_imageable.rb +++ b/spec/shared/system/nested_imageable.rb @@ -33,7 +33,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p expect(page).not_to have_selector "#new_image_link" end - scenario "Should update nested image file name after choosing any file" do + scenario "Should update image file name after choosing any file" do do_login_for user, management: management visit send(path, arguments) @@ -43,7 +43,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p expect(page).to have_selector ".file-name", text: "clippy.jpg" end - scenario "Should update nested image file title with file name after choosing a file when no title defined" do + scenario "Should update image file title after choosing a file when no title is defined" do do_login_for user, management: management visit send(path, arguments) @@ -52,7 +52,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p expect_image_has_title("clippy.jpg") end - scenario "Should not update nested image file title with file name after choosing a file when title already defined" do + scenario "Should not update image file title after choosing a file when a title is already defined" do do_login_for user, management: management visit send(path, arguments) @@ -112,7 +112,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p expect(cached_attachment_field.value).to be_empty end - scenario "Should show nested image errors after invalid form submit" do + scenario "Should show image errors after invalid form submit" do do_login_for user, management: management visit send(path, arguments) @@ -137,7 +137,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p expect(page).to have_css "img[src$='clippy.jpg']" end - scenario "Should remove nested image after valid file upload and click on remove button" do + scenario "Should remove image after valid file upload and click on remove button" do do_login_for user, management: management visit send(path, arguments) diff --git a/spec/system/admin/poll/shifts_spec.rb b/spec/system/admin/poll/shifts_spec.rb index 1b92aa606..3effc075c 100644 --- a/spec/system/admin/poll/shifts_spec.rb +++ b/spec/system/admin/poll/shifts_spec.rb @@ -88,7 +88,7 @@ describe "Admin shifts", :admin do end end - scenario "Vote Collection Shift and Recount & Scrutiny Shift don't include already assigned dates to officer" do + scenario "Vote Collection Shift and Recount & Scrutiny Shift don't include already assigned dates" do poll = create(:poll) booth = create(:poll_booth, polls: [poll]) officer = create(:poll_officer) diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb index 6f7c6e55d..639db3a24 100644 --- a/spec/system/comments/budget_investments_spec.rb +++ b/spec/system/comments/budget_investments_spec.rb @@ -123,7 +123,7 @@ describe "Commenting Budget::Investments" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: investment, created_at: Time.current - 10) new_root = create(:comment, commentable: investment, created_at: Time.current) old_child = create(:comment, commentable: investment, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb index d1021bd00..f56e52c35 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -139,7 +139,7 @@ describe "Commenting debates" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: debate, created_at: Time.current - 10) new_root = create(:comment, commentable: debate, created_at: Time.current) old_child = create(:comment, commentable: debate, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/legislation_annotations_spec.rb b/spec/system/comments/legislation_annotations_spec.rb index 8d34062e0..54ae77b22 100644 --- a/spec/system/comments/legislation_annotations_spec.rb +++ b/spec/system/comments/legislation_annotations_spec.rb @@ -120,7 +120,7 @@ describe "Commenting legislation questions" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: annotation, created_at: Time.current - 10) new_root = create(:comment, commentable: annotation, created_at: Time.current) old_child = create(:comment, commentable: annotation, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/legislation_questions_spec.rb b/spec/system/comments/legislation_questions_spec.rb index 0d560e2ac..83bda571d 100644 --- a/spec/system/comments/legislation_questions_spec.rb +++ b/spec/system/comments/legislation_questions_spec.rb @@ -125,7 +125,7 @@ describe "Commenting legislation questions" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: question, created_at: Time.current - 10) new_root = create(:comment, commentable: question, created_at: Time.current) old_child = create(:comment, commentable: question, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/polls_spec.rb b/spec/system/comments/polls_spec.rb index 8179fd476..c4ffbd90f 100644 --- a/spec/system/comments/polls_spec.rb +++ b/spec/system/comments/polls_spec.rb @@ -117,7 +117,7 @@ describe "Commenting polls" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: poll, created_at: Time.current - 10) new_root = create(:comment, commentable: poll, created_at: Time.current) old_child = create(:comment, commentable: poll, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/proposals_spec.rb b/spec/system/comments/proposals_spec.rb index 8b6f86fa8..4e229f3cb 100644 --- a/spec/system/comments/proposals_spec.rb +++ b/spec/system/comments/proposals_spec.rb @@ -119,7 +119,7 @@ describe "Commenting proposals" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do old_root = create(:comment, commentable: proposal, created_at: Time.current - 10) new_root = create(:comment, commentable: proposal, created_at: Time.current) old_child = create(:comment, commentable: proposal, parent_id: new_root.id, created_at: Time.current - 10) diff --git a/spec/system/comments/topics_spec.rb b/spec/system/comments/topics_spec.rb index caa5957cb..51484eec0 100644 --- a/spec/system/comments/topics_spec.rb +++ b/spec/system/comments/topics_spec.rb @@ -126,7 +126,7 @@ describe "Commenting topics from proposals" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do community = proposal.community topic = create(:topic, community: community) old_root = create(:comment, commentable: topic, created_at: Time.current - 10) @@ -673,7 +673,7 @@ describe "Commenting topics from budget investments" do expect(c2.body).to appear_before(c3.body) end - scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do + scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do community = investment.community topic = create(:topic, community: community) old_root = create(:comment, commentable: topic, created_at: Time.current - 10) diff --git a/spec/system/management/document_verifications_spec.rb b/spec/system/management/document_verifications_spec.rb index 0549066cb..2403bcd8a 100644 --- a/spec/system/management/document_verifications_spec.rb +++ b/spec/system/management/document_verifications_spec.rb @@ -44,7 +44,7 @@ describe "DocumentVerifications" do expect(page).to have_content "This document is not registered" end - scenario "Verifying a user which does exists in the census but not in the db redirects allows sending an email" do + scenario "Verifying a user who exists in the census but not in the db allows sending an email" do login_as_manager visit management_document_verifications_path fill_in "document_verification_document_number", with: "12345678Z" diff --git a/spec/system/users_auth_spec.rb b/spec/system/users_auth_spec.rb index 9257a70e2..4fb0ed6e3 100644 --- a/spec/system/users_auth_spec.rb +++ b/spec/system/users_auth_spec.rb @@ -411,7 +411,7 @@ describe "Users" do expect(page).to have_field "Email", with: "manuelacarmena@example.com" end - scenario "Try to register with the email of an already existing user, when no email was provided by oauth" do + scenario "Try to register with an existing email, when no email was provided by oauth" do create(:user, username: "peter", email: "manuela@example.com") OmniAuth.config.add_mock(:twitter, twitter_hash) @@ -448,7 +448,7 @@ describe "Users" do expect(page).to have_field "Email", with: "somethingelse@example.com" end - scenario "Try to register with the email of an already existing user, when an unconfirmed email was provided by oauth" do + scenario "Try to register with an existing email, when an unconfirmed email was provided by oauth" do create(:user, username: "peter", email: "manuelacarmena@example.com") OmniAuth.config.add_mock(:twitter, twitter_hash_with_email)