Skip to content

Commit 890d974

Browse files
committed
Add tmuxinator depcreation tests
1 parent b5c1d5f commit 890d974

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

tmuxp/testsuite/test_config_tmuxinator.py

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,101 @@ def test_config_to_dict(self):
5656
yaml_to_dict = test_config.get()
5757
self.assertDictEqual(yaml_to_dict, self.tmuxinator_dict)
5858

59+
60+
class TmuxinatorDeprecationsTest(unittest.TestCase):
61+
''' tmuxinator uses `tabs` instead of `windows` in older versions
62+
63+
https://github.com/aziz/tmuxinator/blob/master/lib/tmuxinator/project.rb#L18
64+
65+
https://github.com/aziz/tmuxinator/blob/master/spec/fixtures/sample.deprecations.yml
66+
67+
LICENSE: https://github.com/aziz/tmuxinator/blob/master/LICENSE
68+
'''
69+
70+
tmuxinator_yaml = """\
71+
project_name: sample
72+
project_root: ~/test
73+
socket_name: foo # Remove to use default socket
74+
pre: sudo /etc/rc.d/mysqld start # Runs before everything
75+
rbenv: 2.0.0-p247
76+
cli_args: -f ~/.tmux.mac.conf # Pass arguments to tmux
77+
tabs:
78+
- editor:
79+
pre:
80+
- echo "I get run in each pane, before each pane command!"
81+
-
82+
layout: main-vertical
83+
panes:
84+
- vim
85+
- #empty, will just run plain bash
86+
- top
87+
- shell: git pull
88+
- guard:
89+
layout: tiled
90+
pre:
91+
- echo "I get run in each pane."
92+
- echo "Before each pane command!"
93+
panes:
94+
-
95+
- #empty, will just run plain bash
96+
-
97+
- database: bundle exec rails db
98+
- server: bundle exec rails s
99+
- logs: tail -f log/development.log
100+
- console: bundle exec rails c
101+
- capistrano:
102+
'''
103+
- server: ssh user@example.com
104+
"""
105+
106+
107+
class TmuxinatoriSampleTest(unittest.TestCase):
108+
109+
'''https://github.com/aziz/tmuxinator/blob/master/spec/fixtures/sample.yml
110+
111+
LICENSE: https://github.com/aziz/tmuxinator/blob/master/LICENSE
112+
'''
113+
114+
tmuxinator_yaml = """\
115+
# ~/.tmuxinator/sample.yml
116+
# you can make as many tabs as you wish...
117+
118+
name: sample
119+
root: ~/test
120+
socket_name: foo # Remove to use default socket
121+
pre: sudo /etc/rc.d/mysqld start # Runs before everything
122+
pre_window: rbenv shell 2.0.0-p247 # Runs in each tab and pane
123+
tmux_options: -f ~/.tmux.mac.conf # Pass arguments to tmux
124+
windows:
125+
- editor:
126+
pre:
127+
- echo "I get run in each pane, before each pane command!"
128+
-
129+
layout: main-vertical
130+
panes:
131+
- vim
132+
- #empty, will just run plain bash
133+
- top
134+
- shell:
135+
- git pull
136+
- git merge
137+
- guard:
138+
layout: tiled
139+
pre:
140+
- echo "I get run in each pane."
141+
- echo "Before each pane command!"
142+
panes:
143+
-
144+
- #empty, will just run plain bash
145+
-
146+
- database: bundle exec rails db
147+
- server: bundle exec rails s
148+
- logs: tail -f log/development.log
149+
- console: bundle exec rails c
150+
- capistrano:
151+
152+
- server: ssh user@example.com
153+
"""
154+
59155
if __name__ == '__main__':
60156
unittest.main()

0 commit comments

Comments
 (0)