home/roleplay/functional-prompt-tests

Functional Prompt Tests

GPTClaudeGemini··350 copies·updated 2026-07-14
functional-prompt-tests.prompt
## Functional Prompt Tests

Promptly provides an RSpec helper to write functional tests for your prompts. This allows you to verify the rendered output of your prompts, ensuring that they are correctly formatted and that all variables are properly interpolated.

### RSpec Helper

The `expect_prompt_render` helper is available in your RSpec tests. It takes the prompt identifier and a hash of locals as arguments.

**Example:**

when to use it

Community prompt sourced from the open-source GitHub repo wilburhimself/promptly (MIT). A "Functional Prompt Tests" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

wilburhimself/promptly · MIT