main
1describe Scale::Rectangle do
2 it { expect(subject.xml_tag).to eql(:rect) }
3
4 describe "#attributes" do
5 it "includes the x position of the top left corner" do
6 subject.x = 10
7 expect(subject.attributes).to include(x: 10)
8 end
9
10 it "includes the y position of the top left corner" do
11 subject.y = 10
12 expect(subject.attributes).to include(y: 10)
13 end
14
15 it "includes the width" do
16 subject.width = "100%"
17 expect(subject.attributes).to include(width: "100%")
18 end
19
20 it "includes the height" do
21 subject.height = "100%"
22 expect(subject.attributes).to include(height: "100%")
23 end
24
25 it "includes the x radius of the corners" do
26 subject.rx = 10
27 expect(subject.attributes).to include(rx: 10)
28 end
29
30 it "includes the y radius of the corners" do
31 subject.ry = 10
32 expect(subject.attributes).to include(ry: 10)
33 end
34 end
35end