From 282abdeacb35e535dcd5fda65bf97d7a44e167d1 Mon Sep 17 00:00:00 2001 From: Pablo Brasero Date: Thu, 14 Jan 2021 15:59:52 +0000 Subject: [PATCH] Correct text of misleading specs --- spec/helpers/administrate/application_helper_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/helpers/administrate/application_helper_spec.rb b/spec/helpers/administrate/application_helper_spec.rb index 322d6486dd..090188c32f 100644 --- a/spec/helpers/administrate/application_helper_spec.rb +++ b/spec/helpers/administrate/application_helper_spec.rb @@ -93,12 +93,12 @@ expect(requireness(release_year)).to eq("optional") end - it "returns 'optional' if field is required if condition is met" do + it "is 'optional' for fields required only conditionally (with :unless)" do description = page.attributes.detect { |i| i.attribute == :description } expect(requireness(description)).to eq("optional") end - it "returns 'optional' if field is required unless condition is met" do + it "is 'optional' for fields required only conditionally (with :if)" do price = page.attributes.detect { |i| i.attribute == :price } expect(requireness(price)).to eq("optional") end