Skip to content

Commit

Permalink
Remove unused frames in test, stub out columnar test
Browse files Browse the repository at this point in the history
  • Loading branch information
acook committed Oct 11, 2023
1 parent 6163526 commit 7b29e10
Showing 1 changed file with 58 additions and 28 deletions.
86 changes: 58 additions & 28 deletions spec/frame_align_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,6 @@
f0
end

let(:f1) do
f1 = described_class.new name: "f1"
f1 << "a"
f1.size = Tuple 3, 3
f1.fill = ":"
f1.valign = :center
f1.halign = :center
f1
end
let(:f2) do
f2 = described_class.new name: "f2"
f2 << "b"
f2.size = Tuple 3, 3
f2.fill = "*"
f2.valign = :center
f2.halign = :center
f2
end
let(:f3) do
f3 = described_class.new name: "f3"
f3 << "c"
f3.size = Tuple 3, 3
f3.fill = "#"
f3.valign = :center
f3.halign = :center
f3
end

before do
f << "foo"
f << "bar\nbaz"
Expand Down Expand Up @@ -98,4 +70,62 @@
expect(actual).to eq bottomright
end

context "columnar" do
before do
f.arrangement = :columnar
end

xit "does all the things" do
topleft = "foo \nbar \nbaz \n \n \n "
topcenter = " foo \n bar \n baz \n \n \n "
topright = " foo\n bar\n baz\n \n \n "

centerleft = " \nfoo \nbar \nbaz \n \n "
centercenter = " \n foo \n bar \n baz \n \n "
centerright = " \n foo\n bar\n baz\n \n "

bottomleft = " \n \n \nfoo \nbar \nbaz "
bottomcenter = " \n \n \n foo \n bar \n baz "
bottomright = " \n \n \n foo\n bar\n baz"

actual = f.to_s
expect(actual).to eq topleft

f.halign = :center
actual = f.to_s
expect(actual).to eq topcenter

f.halign = :right
actual = f.to_s
expect(actual).to eq topright

f.valign = :center

f.halign = :left
actual = f.to_s
expect(actual).to eq centerleft

f.halign = :center
actual = f.to_s
expect(actual).to eq centercenter

f.halign = :right
actual = f.to_s
expect(actual).to eq centerright

f.valign = :bottom

f.halign = :left
actual = f.to_s
expect(actual).to eq bottomleft

f.halign = :center
actual = f.to_s
expect(actual).to eq bottomcenter

f.halign = :right
actual = f.to_s
expect(actual).to eq bottomright
end
end
end

0 comments on commit 7b29e10

Please sign in to comment.