uh-layout 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -2
- data/lib/uh/layout/version.rb +1 -1
- data/lib/uh/layout.rb +4 -0
- data/spec/uh/layout_spec.rb +24 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bb65a2c71c6948855c070300fbb8443d885b386
|
4
|
+
data.tar.gz: adfd597c14c3a6cb6e96b08f5e5e06605b38dac9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4899027dd185969f9cc7bcbaefaa68133017aa628b54489a72700a00a15ee78913bd49741f8a6b7a7ae0a280bcaf81d484a15f246398dd5932bf77e3552b8a7f
|
7
|
+
data.tar.gz: 0a34f78194a89f3a4aae7e4ef15efa540d9c39ba77bd078f48a9dfc7f01e7c6b9ce526b4ac938ed77f7e3e44897b7114889feb0ad2fdb242cbc3c6ab479e4a0c
|
data/.travis.yml
CHANGED
data/lib/uh/layout/version.rb
CHANGED
data/lib/uh/layout.rb
CHANGED
data/spec/uh/layout_spec.rb
CHANGED
@@ -128,7 +128,27 @@ module Uh
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
describe '
|
131
|
+
describe '#update' do
|
132
|
+
context 'when given client is visible' do
|
133
|
+
before { client.show }
|
134
|
+
|
135
|
+
it 'updates the widgets' do
|
136
|
+
expect(layout).to receive :update_widgets
|
137
|
+
layout.update client
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
context 'when client is hidden' do
|
142
|
+
before { client.hide }
|
143
|
+
|
144
|
+
it 'does not update the widget' do
|
145
|
+
expect(layout).not_to receive :update_widgets
|
146
|
+
layout.update client
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe '#handle_screen_sel' do
|
132
152
|
it 'selects consecutive screen in given direction' do
|
133
153
|
expect { layout.handle_screen_sel :succ }
|
134
154
|
.to change { layout.current_screen.id }.from(0).to(1)
|
@@ -146,7 +166,7 @@ module Uh
|
|
146
166
|
end
|
147
167
|
end
|
148
168
|
|
149
|
-
describe 'handle_screen_set' do
|
169
|
+
describe '#handle_screen_set' do
|
150
170
|
before { layout << client }
|
151
171
|
|
152
172
|
it 'removes current client from origin screen' do
|
@@ -173,7 +193,7 @@ module Uh
|
|
173
193
|
end
|
174
194
|
end
|
175
195
|
|
176
|
-
describe 'handle_tag_sel' do
|
196
|
+
describe '#handle_tag_sel' do
|
177
197
|
before { layout << client }
|
178
198
|
|
179
199
|
it 'hides clients on previously selected tag' do
|
@@ -216,7 +236,7 @@ module Uh
|
|
216
236
|
end
|
217
237
|
end
|
218
238
|
|
219
|
-
describe 'handle_tag_set' do
|
239
|
+
describe '#handle_tag_set' do
|
220
240
|
context 'without client' do
|
221
241
|
it 'does not raise any error' do
|
222
242
|
expect { layout.handle_tag_set '2' }.not_to raise_error
|