public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
Moving spec for #108 to the 'invalid table' describe block
Gavin Stark (author)
Thu Nov 06 20:04:31 -0800 2008
commit  89989e0dfd9f48783ddd16f6a0f777064aaf9112
tree    10e776490f1f3af9f5d4172317cf474de005dfc5
parent  1c554c949357c3bd35160b1816849f7789fef9a9
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
152
153
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
...
109
110
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
113
114
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
0
@@ -109,22 +109,6 @@ describe "A table's content" do
0
       @pdf.table(data)
0
     }.should.not.raise
0
   end   
0
-
0
-  it "should raise an EmptyTableError with an empty table" do
0
-    lambda {
0
-      data = []
0
-      @pdf = Prawn::Document.new
0
-      @pdf.table(data)
0
-    }.should.raise( Prawn::Errors::EmptyTable )
0
-  end   
0
-
0
-  it "should raise an EmptyTableError with a nil table" do
0
-    lambda {
0
-      data = nil
0
-      @pdf = Prawn::Document.new
0
-      @pdf.table(data)
0
-    }.should.raise( Prawn::Errors::EmptyTable )
0
-  end   
0
   
0
   it "should paginate for large tables" do
0
     # 30 rows fit on the table with default setting, 31 exceed.
0
@@ -152,4 +136,21 @@ describe "An invalid table" do
0
       @pdf.table(@bad_data)
0
     end
0
   end
0
+
0
+  it "should raise an EmptyTableError with empty table data" do
0
+    lambda {
0
+      data = []
0
+      @pdf = Prawn::Document.new
0
+      @pdf.table(data)
0
+    }.should.raise( Prawn::Errors::EmptyTable )
0
+  end   
0
+
0
+  it "should raise an EmptyTableError with nil table data" do
0
+    lambda {
0
+      data = nil
0
+      @pdf = Prawn::Document.new
0
+      @pdf.table(data)
0
+    }.should.raise( Prawn::Errors::EmptyTable )
0
+  end   
0
+
0
 end

Comments