fix: replace cond blocks with pattern matching and case (CSM-021)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:04:56 +02:00
parent d231f42363
commit 2be43ca06d
4 changed files with 38 additions and 22 deletions

View File

@@ -0,0 +1,15 @@
defmodule BDS.CSM021CondPatternMatchTest do
use ExUnit.Case, async: true
describe "source-level: no cond blocks in fixed files" do
test "ai.ex has no cond do blocks" do
source = File.read!("lib/bds/ai.ex")
refute source =~ "cond do", "ai.ex should not contain cond do"
end
test "api_docs.ex has no cond do blocks" do
source = File.read!("lib/bds/scripting/api_docs.ex")
refute source =~ "cond do", "api_docs.ex should not contain cond do"
end
end
end