From 12be4612ec4794d4f6cd4ff994d5778bf10fc180 Mon Sep 17 00:00:00 2001 From: magicmilo Date: Mon, 25 Oct 2021 16:32:21 +0100 Subject: [PATCH] prettier --- spec/features/case_log_spec.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/spec/features/case_log_spec.rb b/spec/features/case_log_spec.rb index 8d1435885..bdbcee847 100644 --- a/spec/features/case_log_spec.rb +++ b/spec/features/case_log_spec.rb @@ -96,31 +96,42 @@ RSpec.describe "Test Features" do context "Validate pregnancy questions" do it "Cannot answer yes if no female tenants" do expect { - CaseLog.create!(pregnancy: "Yes", tenant_gender: "Male", tenant_age: 20) + CaseLog.create!(pregnancy: "Yes", + tenant_gender: "Male", + tenant_age: 20) }.to raise_error(ActiveRecord::RecordInvalid) end it "Cannot answer yes if no female tenants within age range" do expect { - CaseLog.create!(pregnancy: "Yes", tenant_gender: "Female", tenant_age: 51) + CaseLog.create!(pregnancy: "Yes", + tenant_gender: "Female", + tenant_age: 51) }.to raise_error(ActiveRecord::RecordInvalid) end it "Cannot answer prefer not to say if no valid tenants" do expect { - CaseLog.create!(pregnancy: "Prefer not to say", tenant_gender: "Male", tenant_age: 20) + CaseLog.create!(pregnancy: "Prefer not to say", + tenant_gender: "Male", + tenant_age: 20) }.to raise_error(ActiveRecord::RecordInvalid) end it "Can answer yes if valid tenants" do expect { - CaseLog.create!(pregnancy: "Yes", tenant_gender: "Female", tenant_age: 20) + CaseLog.create!(pregnancy: "Yes", + tenant_gender: "Female", + tenant_age: 20) }.not_to raise_error(ActiveRecord::RecordInvalid) end it "Can answer yes if valid second tenant" do expect { - CaseLog.create!(pregnancy: "Yes", tenant_gender: "Male", tenant_age: 99, person_2_gender: "Female", person_2_age: 20) + CaseLog.create!(pregnancy: "Yes", + tenant_gender: "Male", tenant_age: 99, + person_2_gender: "Female", + person_2_age: 20) }.not_to raise_error(ActiveRecord::RecordInvalid) end end