-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tmux display_message command arguments build process #17
Conversation
Ooops, |
Could you try adding a spec for this? I'll be glad to help you work things out. Here are the tests for the
Here's where to add it and what it would be like: ###### In this section of Tmux::Client tests ...
describe "#display" do
it "displays text in given area" do
expect(sheller).to receive(:run).with("tmux display 'foo'")
subject.display_message("foo")
end
###### Add something like this ...
context "when displaying on all clients" do
subject { described_class.new(:all) }
it "displays on every client" do
allow(sheller).to receive(:stdout).
with("tmux list-clients -F '\#{client_tty}'") do
"/dev/ttys001\n"
end
expect(sheller).to receive(:run).with("tmux display -c /dev/ttys001 'foo'")
subject.display_message("foo")
end
end
end Make sure the test fails before you fix with the |
Thanks for your quick response. Okay, I try it. |
At first, I reverted commits and added a test according to the previous given comment example to fail tests. |
Next, I pushed the changeset to fix this error again to check passing all tests. |
@e2 If you want to squash these many commits, feel free to say that to me. I'll do it and push again with |
Looks good to me. Just squash it and I'll merge and release a fixed version. Thanks! |
b26169d
to
12925b3
Compare
I've squashed and pushed new one commit just now. You're welcome and thanks for your help 😄 |
Fix tmux display_message command arguments build process
Awesome, thanks! |
Released as 0.0.8 |
I got an error like following with the configuration of
display_on_all_clients: true
.args
hasn't been initialized there and don't have to append options continuously so I fixed from+=
to=
.And more, I thinkclients
has onlyString
elements so removed alsoif client
.