Skip to content

Commit

Permalink
Change to replace output
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Feb 8, 2020
1 parent 7f3be8e commit 099265e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/unit/size_spec.rb
Expand Up @@ -126,10 +126,14 @@ def replace_streams(*streams)
it "reads terminal size" do
screen = TTY::Screen
allow(screen).to receive(:jruby?).and_return(false)
old_output = screen.output
screen.output = output

replace_streams do
expect(screen.size_from_ioctl).to eq([51, 211])
end

screen.output = old_output
end

it "skips reading on jruby" do
Expand Down

0 comments on commit 099265e

Please sign in to comment.