Rename :display, :* events as :*
This commit is contained in:
@@ -19,16 +19,16 @@ module Uh
|
||||
manager.connect
|
||||
end
|
||||
|
||||
it 'emits :display, :connecting event with the display' do
|
||||
events.on :display, :connecting, &block
|
||||
it 'emits :connecting event with the display' do
|
||||
events.on :connecting, &block
|
||||
expect(block).to receive(:call) do |*args|
|
||||
expect(args).to eq [display]
|
||||
end
|
||||
manager.connect
|
||||
end
|
||||
|
||||
it 'emits :display, :connected event with the display' do
|
||||
events.on :display, :connected, &block
|
||||
it 'emits :connected event with the display' do
|
||||
events.on :connected, &block
|
||||
expect(block).to receive(:call) do |*args|
|
||||
expect(args).to eq [display]
|
||||
end
|
||||
@@ -38,8 +38,8 @@ module Uh
|
||||
context 'when connection fails' do
|
||||
before { allow(display).to receive(:open) { fail } }
|
||||
|
||||
it 'does not emit :display, :connected event' do
|
||||
events.on :display, :connected, &block
|
||||
it 'does not emit :connected event' do
|
||||
events.on :connected, &block
|
||||
expect(block).not_to receive :call
|
||||
manager.connect rescue nil
|
||||
end
|
||||
|
@@ -79,7 +79,7 @@ module Uh
|
||||
it 'registers manager event hooks for logging' do
|
||||
runner.register_event_hooks
|
||||
expect(env).to receive(:log)
|
||||
runner.events.emit :display, :connected
|
||||
runner.events.emit :connected
|
||||
end
|
||||
|
||||
it 'registers key bindings event hooks' do
|
||||
|
Reference in New Issue
Block a user