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:
@@ -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}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user