From 938144530cd9cafa9a334d1e0b42458f3a3250e2 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Fri, 17 Feb 2017 16:01:07 -0700 Subject: [PATCH] Fix tests --- spec/terminal_session.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/terminal_session.rb b/spec/terminal_session.rb index 275a90b..a089d27 100644 --- a/spec/terminal_session.rb +++ b/spec/terminal_session.rb @@ -12,7 +12,9 @@ class TerminalSession zsh_bin: ZSH_BIN }.merge(opts) - cmd="PS1=#{opts[:prompt]} TERM=#{opts[:term]} #{ZSH_BIN} -f" + @opts = opts + + cmd="PS1=\"#{opts[:prompt]}\" TERM=#{opts[:term]} #{ZSH_BIN} -f" tmux_command("new-session -d -x #{opts[:width]} -y #{opts[:height]} '#{cmd}'") end @@ -66,6 +68,8 @@ class TerminalSession private + attr_reader :opts + def tmux_socket_name @tmux_socket_name ||= SecureRandom.hex(6) end