Make tmux_socket_name public so you can access easily from binding.pry

Can attach while tests are stopped with `tmux -L <socket_name> attach`
This commit is contained in:
Eric Freese 2017-02-28 11:12:50 -07:00
parent ce362248fa
commit 502fb4a174

View file

@ -18,6 +18,10 @@ class TerminalSession
tmux_command("new-session -d -x #{opts[:width]} -y #{opts[:height]} '#{cmd}'")
end
def tmux_socket_name
@tmux_socket_name ||= SecureRandom.hex(6)
end
def run_command(command)
send_string(command)
send_keys('enter')
@ -70,10 +74,6 @@ class TerminalSession
attr_reader :opts
def tmux_socket_name
@tmux_socket_name ||= SecureRandom.hex(6)
end
def tmux_command(cmd)
out = `tmux -u -L #{tmux_socket_name} #{cmd}`