beads/cmd/bd/setup/setup_test_helpers.go
coffeegoddd☕️✨ d7d7a34607 : refactor to use RunE, emit usage metrics, skip metrics in CI
(cherry picked from commit 9596c7233d)
2026-06-22 20:44:43 +00:00

17 lines
543 B
Go

package setup
import (
"testing"
"github.com/steveyegge/beads/internal/templates/agents"
)
// stubDetectRenderOpts overrides detectRenderOptsImpl to return
// DefaultRenderOpts (HasRemote=true), matching what agents.RenderSection()
// produces. This prevents hash mismatches in tests where no beads config exists.
func stubDetectRenderOpts(t *testing.T) {
t.Helper()
orig := detectRenderOptsImpl
detectRenderOptsImpl = func() agents.RenderOpts { return agents.DefaultRenderOpts() }
t.Cleanup(func() { detectRenderOptsImpl = orig })
}