File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ def call(input_path)
2424 private
2525
2626 def build_question ( question_message )
27- Question . new ( message : question_message , conversation : Conversation . new )
27+ Question . new (
28+ message : question_message ,
29+ conversation : Conversation . new ,
30+ answer_strategy : Rails . configuration . answer_strategy ,
31+ )
2832 end
2933
3034 def absolute_govuk_url ( path )
Original file line number Diff line number Diff line change 7777 . to raise_error ( "File nonexistent.yml does not exist" )
7878 end
7979
80+ it "uses the configured answer strategy" do
81+ allow ( Rails . configuration ) . to receive ( :answer_strategy ) . and_return ( "claude_structured_answer" )
82+
83+ described_class . call ( input_file . path )
84+
85+ expect ( AnswerComposition ::Composer ) . to have_received ( :call ) . with (
86+ an_object_having_attributes ( answer_strategy : "claude_structured_answer" ) ,
87+ ) . twice
88+ end
89+
8090 it "returns the items" do
8191 items = described_class . call ( input_file . path )
8292
You can’t perform that action at this time.
0 commit comments