Skip to content

Commit f72e1de

Browse files
committed
Add test to ensure correct display of one letter content
1 parent cb690f0 commit f72e1de

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/unit/frame_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
].join)
1111
end
1212

13+
it "creates frame around single character content without width & height" do
14+
output = TTY::Box.frame("H")
15+
16+
expect(output).to eq([
17+
"┌─┐\n",
18+
"│H│\n",
19+
"└─┘\n"
20+
].join)
21+
end
22+
1323
it "creates frame around content without width & height values" do
1424
output = TTY::Box.frame "Hello world!"
1525

@@ -53,6 +63,7 @@
5363
"└────────────┘\n"
5464
].join)
5565
end
66+
5667
it "creates frame with only width & height values" do
5768
output = TTY::Box.frame(width: 35, height: 4)
5869

0 commit comments

Comments
 (0)