Sha256: 5456f0b53d4470f49e0f70ee1892202cc2859f4115dca5fa5c02a2fd4750eae7
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
RSpec.describe TTY::Box, ':top, :left options' do it "skips positioning when no top & left values provided" do output = TTY::Box.frame(width: 35, height: 4) expect(output).to eq([ "┌─────────────────────────────────┐\n", "│ │\n", "│ │\n", "└─────────────────────────────────┘\n" ].join) end it "allows to absolutely position within the terminal window" do output = TTY::Box.frame(top: 10, left: 40, width: 35, height: 4) expect(output).to eq([ "\e[11;41H┌─────────────────────────────────┐", "\e[12;41H│\e[12;75H│", "\e[13;41H│\e[13;75H│", "\e[14;41H└─────────────────────────────────┘" ].join) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tty-box-0.4.1 | spec/unit/position_spec.rb |
tty-box-0.4.0 | spec/unit/position_spec.rb |
tty-box-0.3.0 | spec/unit/position_spec.rb |
tty-box-0.2.1 | spec/unit/position_spec.rb |