Rename :display, :* events as :*

This commit is contained in:
Thibault Jouan
2015-04-10 07:52:41 +00:00
parent 325801a037
commit 59e9562279
4 changed files with 11 additions and 11 deletions

View File

@@ -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

View File

@@ -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