Skip to content

Commit 7a5e286

Browse files
committed
Update test assertions to match new edit reply format
The text_editor output changed from 'The file has been edited' and 'Text has been inserted at line N' to 'Successfully replaced text in' and 'Successfully inserted ... at line N'. Update the 5 failing test assertions accordingly.
1 parent dbb57df commit 7a5e286

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

crates/goose-mcp/src/developer/rmcp_developer.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,9 @@ mod tests {
18351835
.as_text()
18361836
.unwrap();
18371837

1838-
assert!(
1839-
assistant_content.text.contains("The file")
1840-
&& assistant_content.text.contains("has been edited")
1841-
);
1838+
assert!(assistant_content
1839+
.text
1840+
.contains("Successfully replaced text in"));
18421841

18431842
// Verify the file contents changed
18441843
let content = fs::read_to_string(&file_path).unwrap();
@@ -2308,7 +2307,7 @@ mod tests {
23082307
.as_text()
23092308
.unwrap();
23102309

2311-
assert!(text.text.contains("Text has been inserted at line 1"));
2310+
assert!(text.text.contains("Successfully inserted") && text.text.contains("at line 1"));
23122311

23132312
// Verify the file content by reading it directly
23142313
let file_content = fs::read_to_string(&file_path).unwrap();
@@ -2365,7 +2364,7 @@ mod tests {
23652364
.as_text()
23662365
.unwrap();
23672366

2368-
assert!(text.text.contains("Text has been inserted at line 3"));
2367+
assert!(text.text.contains("Successfully inserted") && text.text.contains("at line 3"));
23692368

23702369
// Verify the file content by reading it directly
23712370
let file_content = fs::read_to_string(&file_path).unwrap();
@@ -2427,7 +2426,7 @@ mod tests {
24272426
.as_text()
24282427
.unwrap();
24292428

2430-
assert!(text.text.contains("Text has been inserted at line 4"));
2429+
assert!(text.text.contains("Successfully inserted") && text.text.contains("at line 4"));
24312430

24322431
// Verify the file content by reading it directly
24332432
let file_content = fs::read_to_string(&file_path).unwrap();
@@ -2484,7 +2483,7 @@ mod tests {
24842483
.as_text()
24852484
.unwrap();
24862485

2487-
assert!(text.text.contains("Text has been inserted at line 4"));
2486+
assert!(text.text.contains("Successfully inserted") && text.text.contains("at line 4"));
24882487

24892488
// Verify the file content by reading it directly
24902489
let file_content = fs::read_to_string(&file_path).unwrap();

0 commit comments

Comments
 (0)