judge 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,18 +4,22 @@ class JudgeTest < ActionController::TestCase
4
4
  tests FoosController
5
5
 
6
6
  context "form tag" do
7
+
7
8
  should "include validation messages in data attribute" do
8
9
  get :new
9
10
  assert_equal Hash, error_messages.class
10
11
  assert error_messages.include? "inclusion"
11
12
  end
13
+
12
14
  end
13
15
 
14
16
  context "validators" do
17
+
15
18
  setup { get :new }
16
19
 
17
- should "include presence validation in data attribute" do
18
- assert_equal "presence", validators_from("select#foo_one").first["kind"]
20
+ should "include allow_blank validation in data attribute" do
21
+ validators = validators_from("input#foo_two_foobar")
22
+ assert validators.first["options"]["allow_blank"]
19
23
  end
20
24
 
21
25
  should "include length (within range) validation in data attribute" do
@@ -26,11 +30,6 @@ class JudgeTest < ActionController::TestCase
26
30
  assert validators.first["options"]["allow_blank"]
27
31
  end
28
32
 
29
- should "include allow_blank validation in data attribute" do
30
- validators = validators_from("input#foo_two_foobar")
31
- assert validators.first["options"]["allow_blank"]
32
- end
33
-
34
33
  should "include exclusion validation in data atribute" do
35
34
  validators = validators_from("select#foo_three")
36
35
  assert_equal "exclusion", validators.first["kind"]
@@ -67,12 +66,83 @@ class JudgeTest < ActionController::TestCase
67
66
  should "include confirmation validator in data attribute" do
68
67
  validator = validators_from("input#foo_seven").first
69
68
  assert_equal "confirmation", validator["kind"]
69
+ validator2 = validators_from("input#foo_eight").first
70
+ assert_equal "confirmation", validator2["kind"]
71
+ end
72
+
73
+ end
74
+
75
+ context "validated tag output" do
76
+ setup do
77
+ get :new
78
+ @form = Nokogiri::HTML(css_select("form[data-error-messages]").first.to_s)
79
+ end
80
+
81
+ should "do validated_select" do
82
+ assert_equal 1, @form.css("select#foo_one").length
83
+ assert_kind "select#foo_one"
84
+ end
85
+
86
+ should "do validated_radio_button" do
87
+ assert_equal 1, @form.css("input#foo_two_foobar").length
88
+ assert_kind "input#foo_two_foobar"
89
+ end
90
+
91
+ should "do validated_collection_select" do
92
+ assert_equal 1, @form.css("select#foo_three").length
93
+ assert_kind "select#foo_three"
70
94
  end
95
+
96
+ should "do validated_text_area" do
97
+ assert_equal 1, @form.css("textarea#foo_four").length
98
+ assert_kind "textarea#foo_four"
99
+ end
100
+
101
+ should "do validated_grouped_collection_select" do
102
+ assert_equal 1, @form.css("select#foo_five").length
103
+ assert_kind "select#foo_five"
104
+ end
105
+
106
+ should "do validated_check_box" do
107
+ assert_equal 1, @form.css("input#foo_six").length
108
+ assert_kind "input#foo_six"
109
+ end
110
+
111
+ should "do validated_text_field" do
112
+ assert_equal 1, @form.css("input#foo_seven").length
113
+ assert_kind "input#foo_seven"
114
+ end
115
+
116
+ should "do validated_password_field" do
117
+ assert_equal 1, @form.css("input#foo_eight").length
118
+ assert_kind "input#foo_eight"
119
+ end
120
+
121
+ should "do validated_time_zone_select" do
122
+ assert_equal 1, @form.css("select#foo_nine").length
123
+ assert_kind "select#foo_nine"
124
+ end
125
+
126
+ should "do validated_time_select" do
127
+ assert_equal 2, @form.css("select[id^=foo_ten]").length
128
+ assert_kind "select[id^=foo_ten]"
129
+ end
130
+
131
+ should "do validated_datetime_select" do
132
+ assert_equal 5, @form.css("select[id^=foo_eleven]").length
133
+ assert_kind "select[id^=foo_eleven]"
134
+ end
135
+
136
+ should "do validated_date_select" do
137
+ assert_equal 3, @form.css("select[id^=foo_twelve]").length
138
+ assert_kind "select[id^=foo_twelve]"
139
+ end
140
+
71
141
  end
72
142
 
73
- def validators_from(input_selector)
143
+ def validators_from(selector)
74
144
  form = Nokogiri::HTML(css_select("form[data-error-messages]").first.to_s)
75
- data_attribute = form.css(input_selector).first["data-validate"]
145
+ data_attribute = form.css(selector).first["data-validate"]
76
146
  JSON.parse(data_attribute)
77
147
  end
78
148
 
@@ -81,4 +151,9 @@ class JudgeTest < ActionController::TestCase
81
151
  data_attribute = form.css("form").first["data-error-messages"]
82
152
  JSON.parse(data_attribute)
83
153
  end
154
+
155
+ def assert_kind(selector)
156
+ assert validators_from(selector).first["kind"], "kind of validator not found"
157
+ end
158
+
84
159
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
7
+ - 4
8
+ - 0
9
+ version: 0.4.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joe Corcoran
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-26 00:00:00 +01:00
17
+ date: 2011-08-03 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -155,6 +155,8 @@ files:
155
155
  - README.md
156
156
  - Rakefile
157
157
  - VERSION
158
+ - docs/docco.css
159
+ - docs/judge.html
158
160
  - judge.gemspec
159
161
  - lib/generators/judge/judge_generator.rb
160
162
  - lib/generators/judge/templates/json2.js
@@ -208,8 +210,6 @@ files:
208
210
  - test/dummy/db/migrate/20110725082530_create_continent_country_and_city_tables.rb
209
211
  - test/dummy/db/schema.rb
210
212
  - test/dummy/db/test.sqlite3
211
- - test/dummy/log/development.log
212
- - test/dummy/log/production.log
213
213
  - test/dummy/log/server.log
214
214
  - test/dummy/public/404.html
215
215
  - test/dummy/public/422.html
@@ -239,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
- hash: 506679334507431813
242
+ hash: -1821339242454019859
243
243
  segments:
244
244
  - 0
245
245
  version: "0"
@@ -1,310 +0,0 @@
1
- SQL (0.4ms)  SELECT name
2
- FROM sqlite_master
3
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
4
- 
5
- SQL (0.1ms) select sqlite_version(*)
6
- SQL (2.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
7
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
8
- SQL (35.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
- SQL (0.2ms) SELECT name
10
- FROM sqlite_master
11
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
12
- SQL (0.1ms)  SELECT name
13
- FROM sqlite_master
14
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
15
- 
16
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
17
- Migrating to CreateFoos (20110624115516)
18
- SQL (0.6ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "one" varchar(255), "two" varchar(255), "three" varchar(255), "four" varchar(255), "five" varchar(255), "six" varchar(255), "seven" varchar(255), "eight" varchar(255), "nine" varchar(255), "ten" varchar(255), "eleven" varchar(255), "twelve" varchar(255), "thirteen" varchar(255), "fourteen" varchar(255), "created_at" datetime, "updated_at" datetime) 
19
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110624115516')
20
- SQL (0.3ms)  SELECT name
21
- FROM sqlite_master
22
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
23
- 
24
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
25
- SQL (0.2ms)  SELECT name
26
- FROM sqlite_master
27
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
28
- 
29
- SQL (0.1ms) PRAGMA index_list("foos")
30
- SQL (0.5ms) select sqlite_version(*)
31
- SQL (0.2ms) SELECT name
32
- FROM sqlite_master
33
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
34
- SQL (0.1ms)  SELECT name
35
- FROM sqlite_master
36
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
37
- 
38
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
39
- SQL (0.1ms)  SELECT name
40
- FROM sqlite_master
41
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
42
- 
43
- SQL (0.0ms) PRAGMA index_list("foos")
44
- SQL (0.2ms) select sqlite_version(*)
45
- SQL (0.2ms) SELECT name
46
- FROM sqlite_master
47
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
48
- SQL (2.1ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "one" varchar(255), "two" varchar(255), "three" varchar(255), "four" varchar(255), "five" varchar(255), "six" varchar(255), "seven" varchar(255), "eight" varchar(255), "nine" varchar(255), "ten" varchar(255), "eleven" varchar(255), "twelve" varchar(255), "thirteen" varchar(255), "fourteen" varchar(255), "created_at" datetime, "updated_at" datetime) 
49
- SQL (0.2ms) SELECT name
50
- FROM sqlite_master
51
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
52
- SQL (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
53
- SQL (0.1ms) PRAGMA index_list("schema_migrations")
54
- SQL (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
55
- SQL (0.1ms) SELECT name
56
- FROM sqlite_master
57
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
58
- SQL (0.1ms) SELECT version FROM "schema_migrations"
59
- SQL (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624115516')
60
- SQL (0.5ms)  SELECT name
61
- FROM sqlite_master
62
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
63
- 
64
- SQL (0.1ms) SELECT name
65
- FROM sqlite_master
66
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
67
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
68
- Migrating to CreateFoos (20110624115516)
69
- Migrating to CreateFakeCollections (20110724201117)
70
- SQL (0.0ms) select sqlite_version(*)
71
- SQL (0.5ms) CREATE TABLE "fake_collections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "value" varchar(255), "text" varchar(255), "created_at" datetime, "updated_at" datetime) 
72
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110724201117')
73
- SQL (0.3ms)  SELECT name
74
- FROM sqlite_master
75
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
76
- 
77
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
78
- SQL (0.1ms)  SELECT name
79
- FROM sqlite_master
80
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
81
- 
82
- SQL (0.0ms) PRAGMA index_list("fake_collections")
83
- SQL (0.0ms) PRAGMA index_list("foos")
84
- SQL (0.5ms) select sqlite_version(*)
85
- SQL (0.3ms) SELECT name
86
- FROM sqlite_master
87
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
88
- SQL (0.1ms)  SELECT name
89
- FROM sqlite_master
90
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
91
- 
92
- SQL (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
93
- SQL (0.1ms)  SELECT name
94
- FROM sqlite_master
95
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
96
- 
97
- SQL (0.0ms) PRAGMA index_list("fake_collections")
98
- SQL (0.0ms) PRAGMA index_list("foos")
99
- SQL (0.2ms) select sqlite_version(*)
100
- SQL (0.1ms)  SELECT name
101
- FROM sqlite_master
102
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
103
- 
104
- SQL (1.7ms) CREATE TABLE "fake_collections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "value" varchar(255), "text" varchar(255), "created_at" datetime, "updated_at" datetime)
105
- SQL (0.1ms)  SELECT name
106
- FROM sqlite_master
107
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
108
- 
109
- SQL (1.3ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "one" varchar(255), "two" varchar(255), "three" varchar(255), "four" varchar(255), "five" varchar(255), "six" varchar(255), "seven" varchar(255), "eight" varchar(255), "nine" varchar(255), "ten" varchar(255), "eleven" varchar(255), "twelve" varchar(255), "thirteen" varchar(255), "fourteen" varchar(255), "created_at" datetime, "updated_at" datetime)
110
- SQL (0.1ms)  SELECT name
111
- FROM sqlite_master
112
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
113
- 
114
- SQL (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
115
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
116
- SQL (27.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
117
- SQL (0.1ms)  SELECT name
118
- FROM sqlite_master
119
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
120
- 
121
- SQL (0.1ms) SELECT version FROM "schema_migrations"
122
- SQL (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20110724201117')
123
- SQL (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624115516')
124
- SQL (0.6ms)  SELECT name
125
- FROM sqlite_master
126
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
127
- 
128
- SQL (0.3ms) SELECT name
129
- FROM sqlite_master
130
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
131
- SQL (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
132
- Migrating to CreateFoos (20110624115516)
133
- Migrating to CreateFakeCollections (20110724201117)
134
- Migrating to RenameFakeCollectionToFake (20110724201548)
135
- SQL (0.1ms) select sqlite_version(*)
136
- SQL (16.0ms) ALTER TABLE "fake_collections" RENAME TO "fakes"
137
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110724201548')
138
- SQL (0.3ms)  SELECT name
139
- FROM sqlite_master
140
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
141
- 
142
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
143
- SQL (0.1ms)  SELECT name
144
- FROM sqlite_master
145
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
146
- 
147
- SQL (0.0ms) PRAGMA index_list("fakes")
148
- SQL (0.1ms) PRAGMA index_list("foos")
149
- SQL (0.4ms) select sqlite_version(*)
150
- SQL (0.2ms) SELECT name
151
- FROM sqlite_master
152
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
153
- SQL (0.1ms)  SELECT name
154
- FROM sqlite_master
155
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
156
- 
157
- SQL (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
158
- SQL (0.1ms)  SELECT name
159
- FROM sqlite_master
160
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
161
- 
162
- SQL (0.0ms) PRAGMA index_list("fakes")
163
- SQL (0.0ms) PRAGMA index_list("foos")
164
- SQL (0.2ms) select sqlite_version(*)
165
- SQL (0.1ms)  SELECT name
166
- FROM sqlite_master
167
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
168
- 
169
- SQL (1.8ms) CREATE TABLE "fakes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "value" varchar(255), "text" varchar(255), "created_at" datetime, "updated_at" datetime)
170
- SQL (0.1ms)  SELECT name
171
- FROM sqlite_master
172
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
173
- 
174
- SQL (1.8ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "one" varchar(255), "two" varchar(255), "three" varchar(255), "four" varchar(255), "five" varchar(255), "six" varchar(255), "seven" varchar(255), "eight" varchar(255), "nine" varchar(255), "ten" varchar(255), "eleven" varchar(255), "twelve" varchar(255), "thirteen" varchar(255), "fourteen" varchar(255), "created_at" datetime, "updated_at" datetime)
175
- SQL (0.2ms)  SELECT name
176
- FROM sqlite_master
177
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
178
- 
179
- SQL (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
180
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
181
- SQL (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
182
- SQL (0.2ms)  SELECT name
183
- FROM sqlite_master
184
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
185
- 
186
- SQL (0.1ms) SELECT version FROM "schema_migrations"
187
- SQL (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20110724201548')
188
- SQL (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624115516')
189
- SQL (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110724201117')
190
- SQL (0.5ms)  SELECT name
191
- FROM sqlite_master
192
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
193
- 
194
- SQL (0.1ms) SELECT name
195
- FROM sqlite_master
196
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
197
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
198
- Migrating to CreateFoos (20110624115516)
199
- Migrating to CreateFakeCollections (20110724201117)
200
- Migrating to RenameFakeCollectionToFake (20110724201548)
201
- Migrating to CreateContinentCountryAndCityTables (20110725082530)
202
- SQL (0.1ms) select sqlite_version(*)
203
- SQL (0.5ms) CREATE TABLE "continents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
204
- SQL (0.1ms) CREATE TABLE "countries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "continent_id" integer, "name" varchar(255))
205
- SQL (0.1ms) CREATE TABLE "cities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "country_id" integer, "name" varchar(255)) 
206
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110725082530')
207
- SQL (0.3ms)  SELECT name
208
- FROM sqlite_master
209
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
210
- 
211
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
212
- SQL (0.1ms)  SELECT name
213
- FROM sqlite_master
214
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
215
- 
216
- SQL (0.0ms) PRAGMA index_list("cities")
217
- SQL (0.0ms) PRAGMA index_list("continents")
218
- SQL (0.0ms) PRAGMA index_list("countries")
219
- SQL (0.0ms) PRAGMA index_list("fakes")
220
- SQL (0.0ms) PRAGMA index_list("foos")
221
- SQL (0.5ms) select sqlite_version(*)
222
- SQL (0.2ms) SELECT name
223
- FROM sqlite_master
224
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
225
- SQL (0.1ms)  SELECT name
226
- FROM sqlite_master
227
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
228
- 
229
- SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
230
- SQL (0.1ms)  SELECT name
231
- FROM sqlite_master
232
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
233
- 
234
- SQL (0.0ms) PRAGMA index_list("cities")
235
- SQL (0.0ms) PRAGMA index_list("continents")
236
- SQL (0.0ms) PRAGMA index_list("countries")
237
- SQL (0.0ms) PRAGMA index_list("fakes")
238
- SQL (0.0ms) PRAGMA index_list("foos")
239
- SQL (0.2ms) select sqlite_version(*)
240
- SQL (0.1ms) SELECT name
241
- FROM sqlite_master
242
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
243
- SQL (1.9ms) CREATE TABLE "cities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "country_id" integer, "name" varchar(255)) 
244
- SQL (0.1ms) SELECT name
245
- FROM sqlite_master
246
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
247
- SQL (1.4ms) CREATE TABLE "continents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
248
- SQL (0.1ms) SELECT name
249
- FROM sqlite_master
250
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
251
- SQL (1.7ms) CREATE TABLE "countries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "continent_id" integer, "name" varchar(255)) 
252
- SQL (0.1ms) SELECT name
253
- FROM sqlite_master
254
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
255
- SQL (1.5ms) CREATE TABLE "fakes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "value" varchar(255), "text" varchar(255), "created_at" datetime, "updated_at" datetime) 
256
- SQL (0.2ms) SELECT name
257
- FROM sqlite_master
258
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
259
- SQL (1.9ms) CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "one" varchar(255), "two" varchar(255), "three" varchar(255), "four" varchar(255), "five" varchar(255), "six" varchar(255), "seven" varchar(255), "eight" varchar(255), "nine" varchar(255), "ten" varchar(255), "eleven" varchar(255), "twelve" varchar(255), "thirteen" varchar(255), "fourteen" varchar(255), "created_at" datetime, "updated_at" datetime) 
260
- SQL (0.1ms) SELECT name
261
- FROM sqlite_master
262
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
263
- SQL (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
264
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
265
- SQL (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
266
- SQL (0.1ms) SELECT name
267
- FROM sqlite_master
268
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
269
- SQL (0.1ms) SELECT version FROM "schema_migrations"
270
- SQL (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20110725082530')
271
- SQL (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110624115516')
272
- SQL (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110724201117')
273
- SQL (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20110724201548')
274
-
275
-
276
- Started GET "/posts/new" for 127.0.0.1 at 2011-07-25 18:59:00 +0100
277
-
278
- ActionController::RoutingError (No route matches "/posts/new"):
279
-
280
-
281
- Rendered /Users/joecorcoran/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.1ms)
282
-
283
-
284
- Started GET "/foos/new" for 127.0.0.1 at 2011-07-25 18:59:06 +0100
285
- Processing by FoosController#new as HTML
286
- SQL (0.6ms)  SELECT name
287
- FROM sqlite_master
288
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
289
- 
290
- SQL (0.2ms) SELECT name
291
- FROM sqlite_master
292
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
293
- WARNING: Can't mass-assign protected attributes: id
294
- WARNING: Can't mass-assign protected attributes: id
295
- WARNING: Can't mass-assign protected attributes: id
296
- Rendered foos/new.html.erb within layouts/application (44.7ms)
297
- Completed in 221ms
298
-
299
- ActionView::Template::Error (undefined method `validated_form_for' for #<#<Class:0x00000102d4f258>:0x00000102d48e80>):
300
- 1: <h1>New foo</h1>
301
- 2:
302
- 3: <%= validated_form_for(@foo) do |f| %>
303
- 4: <% if @foo.errors.any? %>
304
- 5: <div id="error_explanation">
305
- 6: <h2><%= pluralize(@foo.errors.count, "error") %> prohibited this foo from being saved:</h2>
306
- app/views/foos/new.html.erb:3:in `_app_views_foos_new_html_erb__1838023501461859710_2171221340__2905132362480950973'
307
-
308
- Rendered /Users/joecorcoran/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms)
309
- Rendered /Users/joecorcoran/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.7ms)
310
- Rendered /Users/joecorcoran/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (14.3ms)