Implement Client#show

This commit is contained in:
Thibault Jouan 2015-04-16 18:32:22 +00:00
parent 15f966654b
commit 870e11a702
2 changed files with 23 additions and 0 deletions

View File

@ -34,6 +34,12 @@ module Uh
@window.moveresize @geo @window.moveresize @geo
self self
end end
def show
@window.map
@visible = true
self
end
end end
end end
end end

View File

@ -56,6 +56,23 @@ module Uh
expect(client.moveresize).to be client expect(client.moveresize).to be client
end end
end end
describe '#show' do
it 'maps the window' do
expect(window).to receive :map
client.show
end
it 'toggles the client as visible' do
expect { client.show }
.to change { client.visible? }
.from(false).to true
end
it 'returns self' do
expect(client.show).to be client
end
end
end end
end end
end end