dryparams 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +44 -0
  3. data/Rakefile +22 -0
  4. data/lib/dryparams/dryable.rb +71 -0
  5. data/lib/dryparams/engine.rb +9 -0
  6. data/lib/dryparams/naming.rb +32 -0
  7. data/lib/dryparams/version.rb +18 -0
  8. data/lib/dryparams.rb +8 -0
  9. data/lib/tasks/dryparams_tasks.rake +4 -0
  10. data/test/dryparams/dryable_test.rb +34 -0
  11. data/test/dryparams/engine_test.rb +17 -0
  12. data/test/dryparams/naming_test.rb +38 -0
  13. data/test/dryparams/version_test.rb +30 -0
  14. data/test/dryparams_test.rb +7 -0
  15. data/test/dummy/README.md +27 -0
  16. data/test/dummy/Rakefile +6 -0
  17. data/test/dummy/app/assets/javascripts/application.js +13 -0
  18. data/test/dummy/app/assets/javascripts/users.js +2 -0
  19. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  20. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  21. data/test/dummy/app/assets/stylesheets/users.css +4 -0
  22. data/test/dummy/app/controllers/application_controller.rb +7 -0
  23. data/test/dummy/app/controllers/users_controller.rb +47 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/helpers/users_helper.rb +2 -0
  26. data/test/dummy/app/models/user.rb +2 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/app/views/users/_form.html.erb +29 -0
  29. data/test/dummy/app/views/users/edit.html.erb +6 -0
  30. data/test/dummy/app/views/users/index.html.erb +31 -0
  31. data/test/dummy/app/views/users/new.html.erb +5 -0
  32. data/test/dummy/app/views/users/show.html.erb +19 -0
  33. data/test/dummy/bin/bundle +3 -0
  34. data/test/dummy/bin/rails +4 -0
  35. data/test/dummy/bin/rake +4 -0
  36. data/test/dummy/config/application.rb +23 -0
  37. data/test/dummy/config/boot.rb +5 -0
  38. data/test/dummy/config/database.yml +25 -0
  39. data/test/dummy/config/environment.rb +5 -0
  40. data/test/dummy/config/environments/development.rb +29 -0
  41. data/test/dummy/config/environments/production.rb +80 -0
  42. data/test/dummy/config/environments/test.rb +36 -0
  43. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  44. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  45. data/test/dummy/config/initializers/inflections.rb +16 -0
  46. data/test/dummy/config/initializers/mime_types.rb +5 -0
  47. data/test/dummy/config/initializers/secret_token.rb +12 -0
  48. data/test/dummy/config/initializers/session_store.rb +3 -0
  49. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  50. data/test/dummy/config/locales/en.yml +23 -0
  51. data/test/dummy/config/routes.rb +58 -0
  52. data/test/dummy/config.ru +4 -0
  53. data/test/dummy/db/migrate/20130815184453_create_users.rb +11 -0
  54. data/test/dummy/db/schema.rb +24 -0
  55. data/test/dummy/db/test.sqlite3 +0 -0
  56. data/test/dummy/log/test.log +354 -0
  57. data/test/dummy/public/404.html +58 -0
  58. data/test/dummy/public/422.html +58 -0
  59. data/test/dummy/public/500.html +57 -0
  60. data/test/dummy/public/favicon.ico +0 -0
  61. data/test/dummy/test/controllers/users_controller_test.rb +20 -0
  62. data/test/dummy/test/fixtures/users.yml +11 -0
  63. data/test/dummy/test/helpers/users_helper_test.rb +7 -0
  64. data/test/dummy/test/models/user_test.rb +7 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174 +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6 +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124 +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  77. data/test/test_helper.rb +21 -0
  78. metadata +262 -0
@@ -0,0 +1,354 @@
1
+  (0.3ms) begin transaction
2
+  (0.1ms) rollback transaction
3
+  (0.1ms) begin transaction
4
+  (0.0ms) rollback transaction
5
+  (0.0ms) begin transaction
6
+  (0.0ms) rollback transaction
7
+  (0.0ms) begin transaction
8
+  (0.0ms) rollback transaction
9
+  (0.0ms) begin transaction
10
+  (0.0ms) rollback transaction
11
+  (0.0ms) begin transaction
12
+  (0.0ms) rollback transaction
13
+  (0.0ms) begin transaction
14
+  (0.0ms) rollback transaction
15
+  (0.0ms) begin transaction
16
+  (0.0ms) rollback transaction
17
+  (0.0ms) begin transaction
18
+  (0.0ms) rollback transaction
19
+  (0.1ms) begin transaction
20
+  (0.1ms) rollback transaction
21
+  (0.1ms) begin transaction
22
+  (0.0ms) rollback transaction
23
+  (0.1ms) begin transaction
24
+  (0.1ms) rollback transaction
25
+  (0.0ms) begin transaction
26
+  (0.0ms) rollback transaction
27
+  (0.0ms) begin transaction
28
+  (0.0ms) rollback transaction
29
+  (0.0ms) begin transaction
30
+  (0.0ms) rollback transaction
31
+  (0.0ms) begin transaction
32
+  (0.0ms) rollback transaction
33
+  (0.0ms) begin transaction
34
+  (0.0ms) rollback transaction
35
+  (0.0ms) begin transaction
36
+  (0.0ms) rollback transaction
37
+  (0.1ms) begin transaction
38
+  (0.0ms) rollback transaction
39
+  (0.0ms) begin transaction
40
+  (0.0ms) rollback transaction
41
+  (0.1ms) begin transaction
42
+  (0.0ms) rollback transaction
43
+  (0.0ms) begin transaction
44
+  (0.0ms) rollback transaction
45
+  (0.1ms) begin transaction
46
+  (0.0ms) rollback transaction
47
+  (0.0ms) begin transaction
48
+  (0.0ms) rollback transaction
49
+  (0.1ms) begin transaction
50
+  (0.0ms) rollback transaction
51
+  (0.1ms) begin transaction
52
+  (0.0ms) rollback transaction
53
+  (0.1ms) begin transaction
54
+  (0.0ms) rollback transaction
55
+  (1.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "lastname" varchar(255), "firstname" varchar(255), "email" varchar(255), "created_at" datetime, "updated_at" datetime) 
56
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
57
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
58
+  (0.1ms) SELECT version FROM "schema_migrations"
59
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20130815184453')
60
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
61
+  (0.3ms) begin transaction
62
+ Fixture Delete (0.3ms) DELETE FROM "users"
63
+ Fixture Insert (0.1ms) INSERT INTO "users" ("lastname", "firstname", "email", "created_at", "updated_at", "id") VALUES ('Doe', 'John', 'john.doe@mail.com', '2013-08-16 07:06:57', '2013-08-16 07:06:57', 830138774)
64
+ Fixture Insert (0.1ms) INSERT INTO "users" ("lastname", "firstname", "email", "created_at", "updated_at", "id") VALUES ('Doe', 'Jane', 'jane.doe@mail.com', '2013-08-16 07:06:57', '2013-08-16 07:06:57', 980204181)
65
+  (1.1ms) commit transaction
66
+  (0.0ms) begin transaction
67
+ ---------------------------------------------------------------------------------
68
+ DRYParams::DryableTest: test_class_methods_should_have_a_constant_default_actions
69
+ ---------------------------------------------------------------------------------
70
+  (0.1ms) rollback transaction
71
+  (0.1ms) begin transaction
72
+ -------------------------------------------------------
73
+ DRYParams::DryableTest: test_dryable_should_be_a_module
74
+ -------------------------------------------------------
75
+  (0.1ms) rollback transaction
76
+  (0.0ms) begin transaction
77
+ -----------------------------------------------------------------------------------
78
+ DRYParams::DryableTest: test_dryable_should_be_extended_by_active_support::extended
79
+ -----------------------------------------------------------------------------------
80
+  (0.0ms) rollback transaction
81
+  (0.0ms) begin transaction
82
+ --------------------------------------------------------------------------
83
+ DRYParams::DryableTest: test_dryable_should_have_a_submodule_class_methods
84
+ --------------------------------------------------------------------------
85
+  (0.0ms) rollback transaction
86
+  (0.0ms) begin transaction
87
+ -------------------------------------------------------------------
88
+ DRYParams::DryableTest: test_filter_params_method_should_be_defined
89
+ -------------------------------------------------------------------
90
+  (0.0ms) rollback transaction
91
+  (0.0ms) begin transaction
92
+ ------------------------------------------------------------------------
93
+ DRYParams::DryableTest: test_set_current_object_method_should_be_defined
94
+ ------------------------------------------------------------------------
95
+  (0.0ms) rollback transaction
96
+  (0.0ms) begin transaction
97
+ ----------------------------------------------------------------------------------
98
+ DRYParams::DryableTest: test_set_object_and_filter_params_method_should_be_defined
99
+ ----------------------------------------------------------------------------------
100
+  (0.0ms) rollback transaction
101
+  (0.0ms) begin transaction
102
+ ---------------------------------------------------------------------------------
103
+ DRYParams::EngineTest: test_dryable_should_be_included_in_action_controller::base
104
+ ---------------------------------------------------------------------------------
105
+  (0.1ms) rollback transaction
106
+  (0.0ms) begin transaction
107
+ ----------------------------------------------------
108
+ DRYParams::EngineTest: test_engine_should_be_a_class
109
+ ----------------------------------------------------
110
+  (0.0ms) rollback transaction
111
+  (0.0ms) begin transaction
112
+ -----------------------------------------------------------------------
113
+ DRYParams::EngineTest: test_engine_should_be_herited_from_rails::engine
114
+ -----------------------------------------------------------------------
115
+  (0.0ms) rollback transaction
116
+  (0.0ms) begin transaction
117
+ ----------------------------------------------------------------
118
+ DRYParams::NamingTest: test_Constructor_should_take_one_argument
119
+ ----------------------------------------------------------------
120
+  (0.1ms) rollback transaction
121
+  (0.0ms) begin transaction
122
+ -----------------------------------------------------------------------
123
+ DRYParams::NamingTest: test_DRYParams::Naming_should_have_a_constructor
124
+ -----------------------------------------------------------------------
125
+  (0.0ms) rollback transaction
126
+  (0.0ms) begin transaction
127
+ ------------------------------------------------------
128
+ DRYParams::NamingTest: test_method_klass_return_string
129
+ ------------------------------------------------------
130
+  (0.0ms) rollback transaction
131
+  (0.0ms) begin transaction
132
+ -------------------------------------------------------
133
+ DRYParams::NamingTest: test_method_model_return_a_class
134
+ -------------------------------------------------------
135
+  (0.0ms) rollback transaction
136
+  (0.0ms) begin transaction
137
+ ----------------------------------------------------------------------
138
+ DRYParams::NamingTest: test_method_model_return_nil_if_class_not_found
139
+ ----------------------------------------------------------------------
140
+  (0.0ms) rollback transaction
141
+  (0.0ms) begin transaction
142
+ -------------------------------------------------------
143
+ DRYParams::NamingTest: test_method_object_return_string
144
+ -------------------------------------------------------
145
+  (0.0ms) rollback transaction
146
+  (0.0ms) begin transaction
147
+ ----------------------------------------------------
148
+ DRYParams::NamingTest: test_naming_should_be_a_class
149
+ ----------------------------------------------------
150
+  (0.0ms) rollback transaction
151
+  (0.0ms) begin transaction
152
+ -----------------------------------------------------------
153
+ DRYParams::VersionTest: test_major_constant_must_be_defined
154
+ -----------------------------------------------------------
155
+  (0.0ms) rollback transaction
156
+  (0.1ms) begin transaction
157
+ -----------------------------------------------------------
158
+ DRYParams::VersionTest: test_minor_constant_must_be_defined
159
+ -----------------------------------------------------------
160
+  (0.0ms) rollback transaction
161
+  (0.0ms) begin transaction
162
+ ---------------------------------------------------------
163
+ DRYParams::VersionTest: test_pre_constant_must_be_defined
164
+ ---------------------------------------------------------
165
+  (0.0ms) rollback transaction
166
+  (0.0ms) begin transaction
167
+ ------------------------------------------------------------
168
+ DRYParams::VersionTest: test_string_constant_must_be_defined
169
+ ------------------------------------------------------------
170
+  (0.0ms) rollback transaction
171
+  (0.0ms) begin transaction
172
+ ----------------------------------------------------------
173
+ DRYParams::VersionTest: test_tiny_constant_must_be_defined
174
+ ----------------------------------------------------------
175
+  (0.0ms) rollback transaction
176
+  (0.0ms) begin transaction
177
+ -------------------------------------------------------
178
+ DRYParams::VersionTest: test_version_should_be_a_module
179
+ -------------------------------------------------------
180
+  (0.0ms) rollback transaction
181
+  (0.0ms) begin transaction
182
+ ------------------------------------------------
183
+ DRYParamsTest: test_DRYParams_should_be_a_module
184
+ ------------------------------------------------
185
+  (0.0ms) rollback transaction
186
+  (0.0ms) begin transaction
187
+ ----------------------------------------------------------------------------
188
+ UsersControllerTest: test_private_instance_method_set_user_should_be_defined
189
+ ----------------------------------------------------------------------------
190
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
191
+  (0.1ms) rollback transaction
192
+  (0.1ms) begin transaction
193
+ --------------------------------------------------------------------------------
194
+ UsersControllerTest: test_private_instance_method_users_params_should_be_defined
195
+ --------------------------------------------------------------------------------
196
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
197
+  (0.1ms) rollback transaction
198
+  (0.0ms) begin transaction
199
+ ------------------------------------------
200
+ UsersControllerTest: test_should_show_user
201
+ ------------------------------------------
202
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
203
+ Processing by UsersController#show as HTML
204
+ Parameters: {"id"=>"830138774"}
205
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "830138774"]]
206
+ Completed 200 OK in 34ms (Views: 33.3ms | ActiveRecord: 0.1ms)
207
+  (0.1ms) rollback transaction
208
+  (0.4ms) begin transaction
209
+ Fixture Delete (0.2ms) DELETE FROM "users"
210
+ Fixture Insert (0.2ms) INSERT INTO "users" ("lastname", "firstname", "email", "created_at", "updated_at", "id") VALUES ('Doe', 'John', 'john.doe@mail.com', '2013-08-20 06:31:28', '2013-08-20 06:31:28', 830138774)
211
+ Fixture Insert (0.1ms) INSERT INTO "users" ("lastname", "firstname", "email", "created_at", "updated_at", "id") VALUES ('Doe', 'Jane', 'jane.doe@mail.com', '2013-08-20 06:31:28', '2013-08-20 06:31:28', 980204181)
212
+  (0.6ms) commit transaction
213
+  (0.1ms) begin transaction
214
+ ---------------------------------------------------------------------------------
215
+ DRYParams::DryableTest: test_class_methods_should_have_a_constant_default_actions
216
+ ---------------------------------------------------------------------------------
217
+  (0.1ms) rollback transaction
218
+  (0.1ms) begin transaction
219
+ -------------------------------------------------------
220
+ DRYParams::DryableTest: test_dryable_should_be_a_module
221
+ -------------------------------------------------------
222
+  (0.1ms) rollback transaction
223
+  (0.1ms) begin transaction
224
+ -----------------------------------------------------------------------------------
225
+ DRYParams::DryableTest: test_dryable_should_be_extended_by_active_support::extended
226
+ -----------------------------------------------------------------------------------
227
+  (0.0ms) rollback transaction
228
+  (0.0ms) begin transaction
229
+ --------------------------------------------------------------------------
230
+ DRYParams::DryableTest: test_dryable_should_have_a_submodule_class_methods
231
+ --------------------------------------------------------------------------
232
+  (0.0ms) rollback transaction
233
+  (0.1ms) begin transaction
234
+ -------------------------------------------------------------------
235
+ DRYParams::DryableTest: test_filter_params_method_should_be_defined
236
+ -------------------------------------------------------------------
237
+  (0.1ms) rollback transaction
238
+  (0.1ms) begin transaction
239
+ ------------------------------------------------------------------------
240
+ DRYParams::DryableTest: test_set_current_object_method_should_be_defined
241
+ ------------------------------------------------------------------------
242
+  (0.0ms) rollback transaction
243
+  (0.0ms) begin transaction
244
+ ----------------------------------------------------------------------------------
245
+ DRYParams::DryableTest: test_set_object_and_filter_params_method_should_be_defined
246
+ ----------------------------------------------------------------------------------
247
+  (0.0ms) rollback transaction
248
+  (0.1ms) begin transaction
249
+ ---------------------------------------------------------------------------------
250
+ DRYParams::EngineTest: test_dryable_should_be_included_in_action_controller::base
251
+ ---------------------------------------------------------------------------------
252
+  (0.1ms) rollback transaction
253
+  (0.0ms) begin transaction
254
+ ----------------------------------------------------
255
+ DRYParams::EngineTest: test_engine_should_be_a_class
256
+ ----------------------------------------------------
257
+  (0.0ms) rollback transaction
258
+  (0.0ms) begin transaction
259
+ -----------------------------------------------------------------------
260
+ DRYParams::EngineTest: test_engine_should_be_herited_from_rails::engine
261
+ -----------------------------------------------------------------------
262
+  (0.1ms) rollback transaction
263
+  (0.0ms) begin transaction
264
+ ----------------------------------------------------------------
265
+ DRYParams::NamingTest: test_Constructor_should_take_one_argument
266
+ ----------------------------------------------------------------
267
+  (0.1ms) rollback transaction
268
+  (0.0ms) begin transaction
269
+ -----------------------------------------------------------------------
270
+ DRYParams::NamingTest: test_DRYParams::Naming_should_have_a_constructor
271
+ -----------------------------------------------------------------------
272
+  (0.0ms) rollback transaction
273
+  (0.0ms) begin transaction
274
+ ------------------------------------------------------
275
+ DRYParams::NamingTest: test_method_klass_return_string
276
+ ------------------------------------------------------
277
+  (0.1ms) rollback transaction
278
+  (0.1ms) begin transaction
279
+ -------------------------------------------------------
280
+ DRYParams::NamingTest: test_method_model_return_a_class
281
+ -------------------------------------------------------
282
+  (0.1ms) rollback transaction
283
+  (0.1ms) begin transaction
284
+ ----------------------------------------------------------------------
285
+ DRYParams::NamingTest: test_method_model_return_nil_if_class_not_found
286
+ ----------------------------------------------------------------------
287
+  (0.1ms) rollback transaction
288
+  (0.1ms) begin transaction
289
+ -------------------------------------------------------
290
+ DRYParams::NamingTest: test_method_object_return_string
291
+ -------------------------------------------------------
292
+  (0.1ms) rollback transaction
293
+  (0.1ms) begin transaction
294
+ ----------------------------------------------------
295
+ DRYParams::NamingTest: test_naming_should_be_a_class
296
+ ----------------------------------------------------
297
+  (0.0ms) rollback transaction
298
+  (0.0ms) begin transaction
299
+ -----------------------------------------------------------
300
+ DRYParams::VersionTest: test_major_constant_must_be_defined
301
+ -----------------------------------------------------------
302
+  (0.1ms) rollback transaction
303
+  (0.1ms) begin transaction
304
+ -----------------------------------------------------------
305
+ DRYParams::VersionTest: test_minor_constant_must_be_defined
306
+ -----------------------------------------------------------
307
+  (0.0ms) rollback transaction
308
+  (0.0ms) begin transaction
309
+ ---------------------------------------------------------
310
+ DRYParams::VersionTest: test_pre_constant_must_be_defined
311
+ ---------------------------------------------------------
312
+  (0.0ms) rollback transaction
313
+  (0.1ms) begin transaction
314
+ ------------------------------------------------------------
315
+ DRYParams::VersionTest: test_string_constant_must_be_defined
316
+ ------------------------------------------------------------
317
+  (0.0ms) rollback transaction
318
+  (0.1ms) begin transaction
319
+ ----------------------------------------------------------
320
+ DRYParams::VersionTest: test_tiny_constant_must_be_defined
321
+ ----------------------------------------------------------
322
+  (0.0ms) rollback transaction
323
+  (0.1ms) begin transaction
324
+ -------------------------------------------------------
325
+ DRYParams::VersionTest: test_version_should_be_a_module
326
+ -------------------------------------------------------
327
+  (0.0ms) rollback transaction
328
+  (0.0ms) begin transaction
329
+ ------------------------------------------------
330
+ DRYParamsTest: test_DRYParams_should_be_a_module
331
+ ------------------------------------------------
332
+  (0.1ms) rollback transaction
333
+  (0.1ms) begin transaction
334
+ ----------------------------------------------------------------------------
335
+ UsersControllerTest: test_private_instance_method_set_user_should_be_defined
336
+ ----------------------------------------------------------------------------
337
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
338
+  (0.1ms) rollback transaction
339
+  (0.1ms) begin transaction
340
+ --------------------------------------------------------------------------------
341
+ UsersControllerTest: test_private_instance_method_users_params_should_be_defined
342
+ --------------------------------------------------------------------------------
343
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
344
+  (0.1ms) rollback transaction
345
+  (0.1ms) begin transaction
346
+ ------------------------------------------
347
+ UsersControllerTest: test_should_show_user
348
+ ------------------------------------------
349
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 830138774]]
350
+ Processing by UsersController#show as HTML
351
+ Parameters: {"id"=>"830138774"}
352
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "830138774"]]
353
+ Completed 200 OK in 41ms (Views: 39.5ms | ActiveRecord: 0.1ms)
354
+  (0.1ms) 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,20 @@
1
+ require 'test_helper'
2
+
3
+ class UsersControllerTest < ActionController::TestCase
4
+ setup do
5
+ @user = users(:john)
6
+ end
7
+
8
+ test 'private instance method set_user should be defined' do
9
+ assert UsersController.private_instance_methods.include?(:set_user)
10
+ end
11
+
12
+ test 'private instance method users_params should be defined' do
13
+ assert UsersController.private_instance_methods.include?(:user_params)
14
+ end
15
+
16
+ test 'should show user' do
17
+ get :show, id: @user
18
+ assert_not_nil assigns(:user)
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ john:
4
+ lastname: Doe
5
+ firstname: John
6
+ email: john.doe@mail.com
7
+
8
+ jane:
9
+ lastname: Doe
10
+ firstname: Jane
11
+ email: jane.doe@mail.com
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UsersHelperTest < ActionView::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,21 @@
1
+ # Coveralls service
2
+ require 'coveralls'
3
+ Coveralls.wear!
4
+
5
+ # Configure Rails Environment
6
+ ENV['RAILS_ENV'] = 'test'
7
+
8
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
9
+ require 'rails/test_help'
10
+
11
+ Rails.backtrace_cleaner.remove_silencers!
12
+
13
+ # Load support files
14
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
15
+
16
+ # Load fixtures from the engine
17
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
18
+ ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
19
+ end
20
+ ActiveSupport::TestCase.fixtures :all
21
+