Skip to content

Commit 2d15107

Browse files
authored
Update form_yaml_database_schema_spec.rb
1 parent ec5de58 commit 2d15107

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

spec/lib/form_yaml_database_schema_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,19 @@
211211
# Determine which database fields need to exist
212212
# based on partial name
213213
required_fields = []
214-
partial_str = partial.to_s
215214

216215
# If partial doesn't start with pass_fail, it needs the base field
217-
unless partial_str.start_with?("pass_fail")
216+
unless partial.start_with?("pass_fail")
218217
required_fields << field.to_s
219218
end
220219

221220
# If partial contains pass_fail, it needs the _pass field
222-
if partial_str.include?("pass_fail")
221+
if partial.include?("pass_fail")
223222
required_fields << "#{field}_pass"
224223
end
225224

226225
# If partial contains comment, it needs the _comment field
227-
if partial_str.include?("comment")
226+
if partial.include?("comment")
228227
required_fields << "#{field}_comment"
229228
end
230229

0 commit comments

Comments
 (0)