Hoisted assert clipboard into TestAppContext
This commit is contained in:
parent
9209c0dfeb
commit
2a6e23ff28
4 changed files with 9 additions and 17 deletions
|
@ -147,14 +147,6 @@ impl<'a> VimTestContext<'a> {
|
|||
let mode = self.mode();
|
||||
VimBindingTestContext::new(keystrokes, mode, mode, self)
|
||||
}
|
||||
|
||||
pub fn assert_clipboard_content(&mut self, expected_content: Option<&str>) {
|
||||
self.cx.update(|cx| {
|
||||
let actual_content = cx.read_from_clipboard().map(|item| item.text().to_owned());
|
||||
let expected_content = expected_content.map(|content| content.to_owned());
|
||||
assert_eq!(actual_content, expected_content);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Deref for VimTestContext<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue