mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Add after_sourcing hook for tests
Is executed immediately after sourcing the plugin
This commit is contained in:
parent
a78ea16c50
commit
f0f1332e6b
2 changed files with 24 additions and 11 deletions
|
|
@ -6,12 +6,14 @@ RSpec.shared_context 'terminal session' do
|
|||
let(:term_opts) { {} }
|
||||
let(:session) { TerminalSession.new(term_opts) }
|
||||
let(:before_sourcing) { -> {} }
|
||||
let(:after_sourcing) { -> {} }
|
||||
let(:options) { [] }
|
||||
|
||||
around do |example|
|
||||
before_sourcing.call
|
||||
|
||||
session.run_command((['source zsh-autosuggestions.zsh'] + options).join('; '))
|
||||
after_sourcing.call
|
||||
session.clear_screen
|
||||
|
||||
example.run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue