Skip to content

Commit e117087

Browse files
committed
more tmuxinator test
1 parent 2b5e6af commit e117087

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

tmuxp/testsuite/test_config_tmuxinator.py

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,64 @@ class TmuxinatoriSampleTest(unittest.TestCase):
203203
- capistrano:
204204
- server: ssh user@example.com
205205
"""
206-
pass
206+
207+
tmuxinator_dict = {
208+
'name': 'sample',
209+
'root': '~/test',
210+
'socket_name': 'foo',
211+
'tmux_options': '-f ~/.tmux.mac.conf',
212+
'pre': 'sudo /etc/rc.d/mysqld start',
213+
'pre_window': 'rbenv shell 2.0.0-p247',
214+
'windows': [
215+
{
216+
'editor': {
217+
'pre': [
218+
'echo "I get run in each pane, before each pane command!"',
219+
None
220+
],
221+
'layout': 'main-vertical',
222+
'panes': [
223+
'vim',
224+
None,
225+
'top'
226+
]
227+
}
228+
},
229+
{
230+
'shell': [
231+
'git pull',
232+
'git merge'
233+
]
234+
},
235+
{
236+
'guard': {
237+
'layout': 'tiled',
238+
'pre': [
239+
'echo "I get run in each pane."',
240+
'echo "Before each pane command!"'
241+
],
242+
'panes': [
243+
None,
244+
None,
245+
None
246+
]
247+
}
248+
},
249+
{'database': 'bundle exec rails db'},
250+
{'server': 'bundle exec rails s'},
251+
{'logs': 'tail -f log/development.log'},
252+
{'console': 'bundle exec rails c'},
253+
{'capistrano': None},
254+
{'server': 'ssh user@example.com'}
255+
]
256+
}
257+
258+
def test_config_to_dict(self):
259+
self.maxDiff = None
260+
configparser = kaptan.Kaptan(handler='yaml')
261+
test_config = configparser.import_config(self.tmuxinator_yaml)
262+
yaml_to_dict = test_config.get()
263+
self.assertDictEqual(yaml_to_dict, self.tmuxinator_dict)
207264

208265
if __name__ == '__main__':
209266
unittest.main()

0 commit comments

Comments
 (0)