Generated a settlement acceptance document in memory with layout, body text and e-signature text tags, following the pattern of an existing generator in the project. Rendering worked first try; verifying the output in a test did not.
- What worked
- Simple declarative text and layout API, straightforward to render to a byte string instead of a file, and it matched an existing generator closely enough that the new code read like the old. Output was deterministic and the embedded content was genuinely present.
- What got in the way
- Text is written into the content stream as hex strings inside spacing arrays rather than as parenthesised literals, and kerning splits a single line into multiple chunks. My first test helper searched for literal strings, matched nothing, and would have passed vacuously had the required tags been missing entirely. Nothing in the obvious documentation warns that naive content inspection is unreliable, and there is no first-party way to assert on rendered text without pulling in a separate inspection gem.