irreverent 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +5 -0
  4. data/Rakefile +32 -0
  5. data/lib/irreverent/flash.rb +45 -0
  6. data/lib/irreverent/locales/en.yml +12 -0
  7. data/lib/irreverent/version.rb +3 -0
  8. data/lib/irreverent.rb +14 -0
  9. data/lib/tasks/irreverent_tasks.rake +4 -0
  10. data/test/dummy/README.rdoc +28 -0
  11. data/test/dummy/Rakefile +6 -0
  12. data/test/dummy/app/assets/javascripts/application.js +13 -0
  13. data/test/dummy/app/assets/javascripts/users.js +2 -0
  14. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  15. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  16. data/test/dummy/app/assets/stylesheets/users.css +4 -0
  17. data/test/dummy/app/controllers/application_controller.rb +5 -0
  18. data/test/dummy/app/controllers/users_controller.rb +56 -0
  19. data/test/dummy/app/helpers/application_helper.rb +2 -0
  20. data/test/dummy/app/helpers/users_helper.rb +2 -0
  21. data/test/dummy/app/models/user.rb +8 -0
  22. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  23. data/test/dummy/app/views/users/_form.html.erb +21 -0
  24. data/test/dummy/app/views/users/edit.html.erb +6 -0
  25. data/test/dummy/app/views/users/index.html.erb +27 -0
  26. data/test/dummy/app/views/users/new.html.erb +5 -0
  27. data/test/dummy/app/views/users/show.html.erb +9 -0
  28. data/test/dummy/bin/bundle +3 -0
  29. data/test/dummy/bin/rails +4 -0
  30. data/test/dummy/bin/rake +4 -0
  31. data/test/dummy/config/application.rb +23 -0
  32. data/test/dummy/config/boot.rb +5 -0
  33. data/test/dummy/config/database.yml +25 -0
  34. data/test/dummy/config/environment.rb +5 -0
  35. data/test/dummy/config/environments/development.rb +29 -0
  36. data/test/dummy/config/environments/production.rb +80 -0
  37. data/test/dummy/config/environments/test.rb +36 -0
  38. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/test/dummy/config/initializers/inflections.rb +16 -0
  41. data/test/dummy/config/initializers/mime_types.rb +5 -0
  42. data/test/dummy/config/initializers/secret_token.rb +12 -0
  43. data/test/dummy/config/initializers/session_store.rb +3 -0
  44. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  45. data/test/dummy/config/locales/en.yml +23 -0
  46. data/test/dummy/config/routes.rb +58 -0
  47. data/test/dummy/config.ru +4 -0
  48. data/test/dummy/db/development.sqlite3 +0 -0
  49. data/test/dummy/db/migrate/20140206221728_create_users.rb +9 -0
  50. data/test/dummy/db/schema.rb +22 -0
  51. data/test/dummy/db/test.sqlite3 +0 -0
  52. data/test/dummy/log/development.log +15 -0
  53. data/test/dummy/log/test.log +416 -0
  54. data/test/dummy/public/404.html +58 -0
  55. data/test/dummy/public/422.html +58 -0
  56. data/test/dummy/public/500.html +57 -0
  57. data/test/dummy/public/favicon.ico +0 -0
  58. data/test/flash_test.rb +35 -0
  59. data/test/irreverent_test.rb +4 -0
  60. data/test/test_helper.rb +15 -0
  61. metadata +181 -0
@@ -0,0 +1,416 @@
1
+  (1005.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
2
+  (198.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
+  (224.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+  (0.3ms) SELECT version FROM "schema_migrations"
5
+  (222.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140206221728')
6
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
7
+  (0.5ms) begin transaction
8
+ ----------------------------------------------------------
9
+ FlashTest: test_sets_notice_message_on_successful_creation
10
+ ----------------------------------------------------------
11
+ Processing by UsersController#create as HTML
12
+ Parameters: {"user"=>{"name"=>"John Doe"}}
13
+  (0.1ms) SAVEPOINT active_record_1
14
+ SQL (8.8ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00]]
15
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16
+ Redirected to http://test.host/users/1
17
+ Completed 302 Found in 29ms (ActiveRecord: 10.1ms)
18
+  (0.3ms) rollback transaction
19
+  (0.1ms) begin transaction
20
+ ---------------------------------------------------------
21
+ FlashTest: test_sets_notice_message_on_successful_destroy
22
+ ---------------------------------------------------------
23
+  (0.1ms) SAVEPOINT active_record_1
24
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00]]
25
+  (0.1ms) RELEASE SAVEPOINT active_record_1
26
+ Processing by UsersController#destroy as HTML
27
+ Parameters: {"id"=>"1"}
28
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
29
+  (0.1ms) SAVEPOINT active_record_1
30
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
31
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32
+ Redirected to http://test.host/users
33
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
34
+  (0.3ms) rollback transaction
35
+  (0.1ms) begin transaction
36
+ --------------------------------------------------------
37
+ FlashTest: test_sets_notice_message_on_successful_update
38
+ --------------------------------------------------------
39
+  (0.1ms) SAVEPOINT active_record_1
40
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00]]
41
+  (0.1ms) RELEASE SAVEPOINT active_record_1
42
+ Processing by UsersController#update as HTML
43
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
44
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
45
+  (0.1ms) SAVEPOINT active_record_1
46
+ SQL (0.4ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:23:58 UTC +00:00]]
47
+  (0.1ms) RELEASE SAVEPOINT active_record_1
48
+ Redirected to http://test.host/users/1
49
+ Completed 302 Found in 7ms (ActiveRecord: 0.6ms)
50
+  (0.3ms) rollback transaction
51
+  (0.5ms) begin transaction
52
+ ----------------------------------------------------------
53
+ FlashTest: test_sets_notice_message_on_successful_creation
54
+ ----------------------------------------------------------
55
+ Processing by UsersController#create as HTML
56
+ Parameters: {"user"=>{"name"=>"John Doe"}}
57
+  (0.1ms) SAVEPOINT active_record_1
58
+ SQL (3.2ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00]]
59
+  (0.1ms) RELEASE SAVEPOINT active_record_1
60
+ Completed 500 Internal Server Error in 17ms
61
+  (0.2ms) rollback transaction
62
+  (0.1ms) begin transaction
63
+ ---------------------------------------------------------
64
+ FlashTest: test_sets_notice_message_on_successful_destroy
65
+ ---------------------------------------------------------
66
+  (0.1ms) SAVEPOINT active_record_1
67
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00]]
68
+  (0.1ms) RELEASE SAVEPOINT active_record_1
69
+ Processing by UsersController#destroy as HTML
70
+ Parameters: {"id"=>"1"}
71
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
72
+  (0.1ms) SAVEPOINT active_record_1
73
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
74
+  (0.1ms) RELEASE SAVEPOINT active_record_1
75
+ Completed 500 Internal Server Error in 6ms
76
+  (0.2ms) rollback transaction
77
+  (0.1ms) begin transaction
78
+ --------------------------------------------------------
79
+ FlashTest: test_sets_notice_message_on_successful_update
80
+ --------------------------------------------------------
81
+  (0.1ms) SAVEPOINT active_record_1
82
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00]]
83
+  (0.1ms) RELEASE SAVEPOINT active_record_1
84
+ Processing by UsersController#update as HTML
85
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
86
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
87
+  (0.1ms) SAVEPOINT active_record_1
88
+ SQL (0.3ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:43:37 UTC +00:00]]
89
+  (0.1ms) RELEASE SAVEPOINT active_record_1
90
+ Completed 500 Internal Server Error in 5ms
91
+  (0.2ms) rollback transaction
92
+  (0.5ms) begin transaction
93
+ ----------------------------------------------------------
94
+ FlashTest: test_sets_notice_message_on_successful_creation
95
+ ----------------------------------------------------------
96
+ Processing by UsersController#create as HTML
97
+ Parameters: {"user"=>{"name"=>"John Doe"}}
98
+  (0.1ms) SAVEPOINT active_record_1
99
+ SQL (3.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00]]
100
+  (0.1ms) RELEASE SAVEPOINT active_record_1
101
+ Redirected to http://test.host/users/1
102
+ Completed 302 Found in 29ms (ActiveRecord: 4.3ms)
103
+  (0.2ms) rollback transaction
104
+  (0.1ms) begin transaction
105
+ ---------------------------------------------------------
106
+ FlashTest: test_sets_notice_message_on_successful_destroy
107
+ ---------------------------------------------------------
108
+  (0.1ms) SAVEPOINT active_record_1
109
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00]]
110
+  (0.1ms) RELEASE SAVEPOINT active_record_1
111
+ Processing by UsersController#destroy as HTML
112
+ Parameters: {"id"=>"1"}
113
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
114
+  (0.1ms) SAVEPOINT active_record_1
115
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
116
+  (0.1ms) RELEASE SAVEPOINT active_record_1
117
+ Redirected to http://test.host/users
118
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
119
+  (0.2ms) rollback transaction
120
+  (0.1ms) begin transaction
121
+ --------------------------------------------------------
122
+ FlashTest: test_sets_notice_message_on_successful_update
123
+ --------------------------------------------------------
124
+  (0.1ms) SAVEPOINT active_record_1
125
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00]]
126
+  (0.1ms) RELEASE SAVEPOINT active_record_1
127
+ Processing by UsersController#update as HTML
128
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
129
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
130
+  (0.1ms) SAVEPOINT active_record_1
131
+ SQL (0.4ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:45:50 UTC +00:00]]
132
+  (0.1ms) RELEASE SAVEPOINT active_record_1
133
+ Redirected to http://test.host/users/1
134
+ Completed 302 Found in 6ms (ActiveRecord: 0.7ms)
135
+  (0.2ms) rollback transaction
136
+  (0.5ms) begin transaction
137
+ ----------------------------------------------------------
138
+ FlashTest: test_sets_notice_message_on_successful_creation
139
+ ----------------------------------------------------------
140
+ Processing by UsersController#create as HTML
141
+ Parameters: {"user"=>{"name"=>"John Doe"}}
142
+  (0.1ms) SAVEPOINT active_record_1
143
+ SQL (3.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00]]
144
+  (0.1ms) RELEASE SAVEPOINT active_record_1
145
+ Redirected to http://test.host/users/1
146
+ Completed 302 Found in 34ms (ActiveRecord: 4.4ms)
147
+  (0.2ms) rollback transaction
148
+  (0.1ms) begin transaction
149
+ ---------------------------------------------------------
150
+ FlashTest: test_sets_notice_message_on_successful_destroy
151
+ ---------------------------------------------------------
152
+  (0.1ms) SAVEPOINT active_record_1
153
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00]]
154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
155
+ Processing by UsersController#destroy as HTML
156
+ Parameters: {"id"=>"1"}
157
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
158
+  (0.1ms) SAVEPOINT active_record_1
159
+ SQL (0.3ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
160
+  (0.1ms) RELEASE SAVEPOINT active_record_1
161
+ Redirected to http://test.host/users
162
+ Completed 302 Found in 6ms (ActiveRecord: 0.7ms)
163
+  (0.2ms) rollback transaction
164
+  (0.1ms) begin transaction
165
+ --------------------------------------------------------
166
+ FlashTest: test_sets_notice_message_on_successful_update
167
+ --------------------------------------------------------
168
+  (0.1ms) SAVEPOINT active_record_1
169
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00]]
170
+  (0.1ms) RELEASE SAVEPOINT active_record_1
171
+ Processing by UsersController#update as HTML
172
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
173
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
174
+  (0.1ms) SAVEPOINT active_record_1
175
+ SQL (0.3ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:47:39 UTC +00:00]]
176
+  (0.1ms) RELEASE SAVEPOINT active_record_1
177
+ Redirected to http://test.host/users/1
178
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
179
+  (0.2ms) rollback transaction
180
+  (0.5ms) begin transaction
181
+ -------------------------------------------------------------
182
+ FlashTest: test_sets_alert_messages_from_the_controller_scope
183
+ -------------------------------------------------------------
184
+  (0.1ms) SAVEPOINT active_record_1
185
+ SQL (3.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00], ["name", "Undestroyable"], ["updated_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00]]
186
+  (0.1ms) RELEASE SAVEPOINT active_record_1
187
+ Processing by UsersController#destroy as HTML
188
+ Parameters: {"id"=>"1"}
189
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
190
+  (0.1ms) SAVEPOINT active_record_1
191
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
192
+  (0.1ms) RELEASE SAVEPOINT active_record_1
193
+ Redirected to http://test.host/users
194
+ Completed 302 Found in 18ms (ActiveRecord: 0.6ms)
195
+  (0.3ms) rollback transaction
196
+  (0.1ms) begin transaction
197
+ ----------------------------------------------------------
198
+ FlashTest: test_sets_notice_message_on_successful_creation
199
+ ----------------------------------------------------------
200
+ Processing by UsersController#create as HTML
201
+ Parameters: {"user"=>{"name"=>"John Doe"}}
202
+  (0.1ms) SAVEPOINT active_record_1
203
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00]]
204
+  (0.1ms) RELEASE SAVEPOINT active_record_1
205
+ Redirected to http://test.host/users/1
206
+ Completed 302 Found in 20ms (ActiveRecord: 0.9ms)
207
+  (0.2ms) rollback transaction
208
+  (0.1ms) begin transaction
209
+ ---------------------------------------------------------
210
+ FlashTest: test_sets_notice_message_on_successful_destroy
211
+ ---------------------------------------------------------
212
+  (0.1ms) SAVEPOINT active_record_1
213
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00]]
214
+  (0.1ms) RELEASE SAVEPOINT active_record_1
215
+ Processing by UsersController#destroy as HTML
216
+ Parameters: {"id"=>"1"}
217
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
218
+  (0.1ms) SAVEPOINT active_record_1
219
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
220
+  (0.1ms) RELEASE SAVEPOINT active_record_1
221
+ Redirected to http://test.host/users
222
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
223
+  (0.2ms) rollback transaction
224
+  (0.1ms) begin transaction
225
+ --------------------------------------------------------
226
+ FlashTest: test_sets_notice_message_on_successful_update
227
+ --------------------------------------------------------
228
+  (0.1ms) SAVEPOINT active_record_1
229
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00]]
230
+  (0.1ms) RELEASE SAVEPOINT active_record_1
231
+ Processing by UsersController#update as HTML
232
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
233
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
234
+  (0.1ms) SAVEPOINT active_record_1
235
+ SQL (0.5ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:49:10 UTC +00:00]]
236
+  (0.1ms) RELEASE SAVEPOINT active_record_1
237
+ Redirected to http://test.host/users/1
238
+ Completed 302 Found in 6ms (ActiveRecord: 0.8ms)
239
+  (0.2ms) rollback transaction
240
+  (0.5ms) begin transaction
241
+ -------------------------------------------------------------
242
+ FlashTest: test_sets_alert_messages_from_the_controller_scope
243
+ -------------------------------------------------------------
244
+  (0.1ms) SAVEPOINT active_record_1
245
+ SQL (9.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00], ["name", "Chuck Norris"], ["updated_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00]]
246
+  (0.1ms) RELEASE SAVEPOINT active_record_1
247
+ Processing by UsersController#destroy as HTML
248
+ Parameters: {"id"=>"1"}
249
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
250
+  (0.1ms) SAVEPOINT active_record_1
251
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
252
+ Redirected to http://test.host/users/1
253
+ Completed 302 Found in 17ms (ActiveRecord: 0.3ms)
254
+  (0.2ms) rollback transaction
255
+  (0.1ms) begin transaction
256
+ ----------------------------------------------------------
257
+ FlashTest: test_sets_notice_message_on_successful_creation
258
+ ----------------------------------------------------------
259
+ Processing by UsersController#create as HTML
260
+ Parameters: {"user"=>{"name"=>"John Doe"}}
261
+  (0.1ms) SAVEPOINT active_record_1
262
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00]]
263
+  (0.1ms) RELEASE SAVEPOINT active_record_1
264
+ Redirected to http://test.host/users/1
265
+ Completed 302 Found in 9ms (ActiveRecord: 0.5ms)
266
+  (0.2ms) rollback transaction
267
+  (0.1ms) begin transaction
268
+ ---------------------------------------------------------
269
+ FlashTest: test_sets_notice_message_on_successful_destroy
270
+ ---------------------------------------------------------
271
+  (0.1ms) SAVEPOINT active_record_1
272
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00]]
273
+  (0.1ms) RELEASE SAVEPOINT active_record_1
274
+ Processing by UsersController#destroy as HTML
275
+ Parameters: {"id"=>"1"}
276
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
277
+  (0.1ms) SAVEPOINT active_record_1
278
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
279
+  (0.1ms) RELEASE SAVEPOINT active_record_1
280
+ Redirected to http://test.host/users
281
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
282
+  (0.2ms) rollback transaction
283
+  (0.1ms) begin transaction
284
+ --------------------------------------------------------
285
+ FlashTest: test_sets_notice_message_on_successful_update
286
+ --------------------------------------------------------
287
+  (0.1ms) SAVEPOINT active_record_1
288
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00]]
289
+  (0.1ms) RELEASE SAVEPOINT active_record_1
290
+ Processing by UsersController#update as HTML
291
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
292
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
293
+  (0.1ms) SAVEPOINT active_record_1
294
+ SQL (0.4ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 22:51:38 UTC +00:00]]
295
+  (0.1ms) RELEASE SAVEPOINT active_record_1
296
+ Redirected to http://test.host/users/1
297
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
298
+  (0.2ms) rollback transaction
299
+  (0.5ms) begin transaction
300
+ -------------------------------------------------------------
301
+ FlashTest: test_sets_alert_messages_from_the_controller_scope
302
+ -------------------------------------------------------------
303
+  (0.1ms) SAVEPOINT active_record_1
304
+ SQL (8.9ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00], ["name", "Chuck Norris"], ["updated_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00]]
305
+  (0.1ms) RELEASE SAVEPOINT active_record_1
306
+ Processing by UsersController#destroy as HTML
307
+ Parameters: {"id"=>"1"}
308
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
309
+  (0.1ms) SAVEPOINT active_record_1
310
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
311
+ Redirected to http://test.host/users/1
312
+ Completed 302 Found in 17ms (ActiveRecord: 0.3ms)
313
+  (0.2ms) rollback transaction
314
+  (0.1ms) begin transaction
315
+ ----------------------------------------------------------
316
+ FlashTest: test_sets_notice_message_on_successful_creation
317
+ ----------------------------------------------------------
318
+ Processing by UsersController#create as HTML
319
+ Parameters: {"user"=>{"name"=>"John Doe"}}
320
+  (0.1ms) SAVEPOINT active_record_1
321
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00]]
322
+  (0.1ms) RELEASE SAVEPOINT active_record_1
323
+ Redirected to http://test.host/users/1
324
+ Completed 302 Found in 9ms (ActiveRecord: 0.5ms)
325
+  (0.2ms) rollback transaction
326
+  (0.1ms) begin transaction
327
+ ---------------------------------------------------------
328
+ FlashTest: test_sets_notice_message_on_successful_destroy
329
+ ---------------------------------------------------------
330
+  (0.1ms) SAVEPOINT active_record_1
331
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00]]
332
+  (0.2ms) RELEASE SAVEPOINT active_record_1
333
+ Processing by UsersController#destroy as HTML
334
+ Parameters: {"id"=>"1"}
335
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
336
+  (0.1ms) SAVEPOINT active_record_1
337
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
338
+  (0.1ms) RELEASE SAVEPOINT active_record_1
339
+ Redirected to http://test.host/users
340
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
341
+  (0.2ms) rollback transaction
342
+  (0.1ms) begin transaction
343
+ --------------------------------------------------------
344
+ FlashTest: test_sets_notice_message_on_successful_update
345
+ --------------------------------------------------------
346
+  (0.1ms) SAVEPOINT active_record_1
347
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00]]
348
+  (0.1ms) RELEASE SAVEPOINT active_record_1
349
+ Processing by UsersController#update as HTML
350
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
351
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
352
+  (0.1ms) SAVEPOINT active_record_1
353
+ SQL (0.4ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 23:04:43 UTC +00:00]]
354
+  (0.1ms) RELEASE SAVEPOINT active_record_1
355
+ Redirected to http://test.host/users/1
356
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
357
+  (0.2ms) rollback transaction
358
+  (0.5ms) begin transaction
359
+ -------------------------------------------------------------
360
+ FlashTest: test_sets_alert_messages_from_the_controller_scope
361
+ -------------------------------------------------------------
362
+  (0.1ms) SAVEPOINT active_record_1
363
+ SQL (3.1ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:10:59 UTC +00:00], ["name", "Chuck Norris"], ["updated_at", Thu, 06 Feb 2014 23:10:59 UTC +00:00]]
364
+  (0.1ms) RELEASE SAVEPOINT active_record_1
365
+ Processing by UsersController#destroy as HTML
366
+ Parameters: {"id"=>"1"}
367
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
368
+  (0.1ms) SAVEPOINT active_record_1
369
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
370
+ Redirected to http://test.host/users/1
371
+ Completed 302 Found in 18ms (ActiveRecord: 0.3ms)
372
+  (0.2ms) rollback transaction
373
+  (0.1ms) begin transaction
374
+ ----------------------------------------------------------
375
+ FlashTest: test_sets_notice_message_on_successful_creation
376
+ ----------------------------------------------------------
377
+ Processing by UsersController#create as HTML
378
+ Parameters: {"user"=>{"name"=>"John Doe"}}
379
+  (0.1ms) SAVEPOINT active_record_1
380
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:10:59 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:10:59 UTC +00:00]]
381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382
+ Redirected to http://test.host/users/1
383
+ Completed 302 Found in 16ms (ActiveRecord: 0.5ms)
384
+  (0.2ms) rollback transaction
385
+  (0.1ms) begin transaction
386
+ ---------------------------------------------------------
387
+ FlashTest: test_sets_notice_message_on_successful_destroy
388
+ ---------------------------------------------------------
389
+  (0.1ms) SAVEPOINT active_record_1
390
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:11:00 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:11:00 UTC +00:00]]
391
+  (0.1ms) RELEASE SAVEPOINT active_record_1
392
+ Processing by UsersController#destroy as HTML
393
+ Parameters: {"id"=>"1"}
394
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
395
+  (0.1ms) SAVEPOINT active_record_1
396
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
397
+  (0.1ms) RELEASE SAVEPOINT active_record_1
398
+ Redirected to http://test.host/users
399
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
400
+  (0.2ms) rollback transaction
401
+  (0.1ms) begin transaction
402
+ --------------------------------------------------------
403
+ FlashTest: test_sets_notice_message_on_successful_update
404
+ --------------------------------------------------------
405
+  (0.1ms) SAVEPOINT active_record_1
406
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Feb 2014 23:11:00 UTC +00:00], ["name", "John Doe"], ["updated_at", Thu, 06 Feb 2014 23:11:00 UTC +00:00]]
407
+  (0.1ms) RELEASE SAVEPOINT active_record_1
408
+ Processing by UsersController#update as HTML
409
+ Parameters: {"user"=>{"name"=>"Another John Doe"}, "id"=>"1"}
410
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
411
+  (0.1ms) SAVEPOINT active_record_1
412
+ SQL (0.4ms) UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["name", "Another John Doe"], ["updated_at", Thu, 06 Feb 2014 23:11:00 UTC +00:00]]
413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
414
+ Redirected to http://test.host/users/1
415
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
416
+  (0.2ms) rollback transaction
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,35 @@
1
+ require 'test_helper'
2
+
3
+ class FlashTest < ActionController::TestCase
4
+ tests UsersController
5
+
6
+ test 'sets notice message on successful creation' do
7
+ post :create, user: { name: 'John Doe' }
8
+ assert_equal 'User was successfully created', flash[:notice]
9
+ end
10
+
11
+ test 'sets notice message on successful update' do
12
+ user = User.create!(name: 'John Doe')
13
+ put :update, id: user.id, user: { name: 'Another John Doe' }
14
+ assert_equal 'User was successfully updated', flash[:notice]
15
+ end
16
+
17
+ test 'sets notice message on successful destroy' do
18
+ user = User.create!(name: 'John Doe')
19
+ delete :destroy, id: user.id
20
+ assert_equal 'User was successfully destroyed', flash[:notice]
21
+ end
22
+
23
+ test 'sets alert messages from the controller scope' do
24
+ begin
25
+ I18n.backend.store_translations :en,
26
+ flash: { users: { destroy: { alert: 'Cannot destroy!' } } }
27
+
28
+ user = User.create! name: 'Chuck Norris'
29
+ delete :destroy, id: user.id
30
+ assert_equal 'Cannot destroy!', flash[:alert]
31
+ ensure
32
+ I18n.reload!
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class IrreverentTest < ActiveSupport::TestCase
4
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV['RAILS_ENV'] = 'test'
3
+
4
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
5
+ require 'rails/test_help'
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
15
+ end