active-component 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +32 -0
- data/lib/active_component/base.rb +55 -0
- data/lib/active_component/context.rb +39 -0
- data/lib/active_component/railtie.rb +13 -0
- data/lib/active_component/renderable.rb +20 -0
- data/lib/active_component/version.rb +3 -0
- data/lib/active_component.rb +7 -0
- data/lib/generators/component_generator.rb +11 -0
- data/lib/generators/templates/application_component.rb +5 -0
- data/lib/generators/templates/component.rb +6 -0
- data/lib/tasks/active_component_tasks.rake +4 -0
- data/test/active_component/base_test.rb +30 -0
- data/test/active_component/context_test.rb +10 -0
- data/test/active_component/railtie_test.rb +9 -0
- data/test/active_component/renderable_test.rb +9 -0
- data/test/active_component_test.rb +9 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/components/application_component.rb +5 -0
- data/test/dummy/app/components/dummy_component.rb +6 -0
- data/test/dummy/app/components/message_component.rb +10 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/templates/dummy_component.mustache +0 -0
- data/test/dummy/app/templates/message_component.mustache +1 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +726 -0
- data/test/dummy/log/test.log +360 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2822de3b22c28bd5e718c9bf500457b2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a9f028f7a492b5907ed80268be8f50f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/generators/component_generator_test.rb +0 -0
- data/test/support/foo.rb +3 -0
- data/test/support/foo_controller.rb +4 -0
- data/test/test_helper.rb +17 -0
- metadata +251 -0
@@ -0,0 +1,360 @@
|
|
1
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2
|
+
--------------------------------------------------------------------------------------------------------
|
3
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
4
|
+
--------------------------------------------------------------------------------------------------------
|
5
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
-------------------------------------------------------------------------------------------------------------------------
|
8
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
9
|
+
-------------------------------------------------------------------------------------------------------------------------
|
10
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
11
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
12
|
+
------------------------------------------------------------------------
|
13
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
14
|
+
------------------------------------------------------------------------
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17
|
+
-------------------------------------------------------------------------
|
18
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
19
|
+
-------------------------------------------------------------------------
|
20
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
21
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
22
|
+
-------------------------------------------------------------------------
|
23
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
24
|
+
-------------------------------------------------------------------------
|
25
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
26
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27
|
+
--------------------------------------------------------------
|
28
|
+
ActiveComponent::ContextTest: test_has_a_get_controller_method
|
29
|
+
--------------------------------------------------------------
|
30
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
31
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
32
|
+
---------------------------------------------------------------
|
33
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
34
|
+
---------------------------------------------------------------
|
35
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
36
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
37
|
+
-------------------------------------------------------------
|
38
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
39
|
+
-------------------------------------------------------------
|
40
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
41
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
42
|
+
---------------------------------------------------------
|
43
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
44
|
+
---------------------------------------------------------
|
45
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
46
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
47
|
+
--------------------------------------------------------------------------------------------------------
|
48
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
49
|
+
--------------------------------------------------------------------------------------------------------
|
50
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
51
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52
|
+
-------------------------------------------------------------------------------------------------------------------------
|
53
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
54
|
+
-------------------------------------------------------------------------------------------------------------------------
|
55
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
56
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
57
|
+
------------------------------------------------------------------------
|
58
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
59
|
+
------------------------------------------------------------------------
|
60
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
61
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
62
|
+
-------------------------------------------------------------------------
|
63
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
64
|
+
-------------------------------------------------------------------------
|
65
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
66
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
67
|
+
-------------------------------------------------------------------------
|
68
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
69
|
+
-------------------------------------------------------------------------
|
70
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
71
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
72
|
+
--------------------------------------------------------------
|
73
|
+
ActiveComponent::ContextTest: test_has_a_get_controller_method
|
74
|
+
--------------------------------------------------------------
|
75
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
76
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
77
|
+
---------------------------------------------------------------
|
78
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
79
|
+
---------------------------------------------------------------
|
80
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
81
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
82
|
+
-------------------------------------------------------------
|
83
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
84
|
+
-------------------------------------------------------------
|
85
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
---------------------------------------------------------
|
88
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
89
|
+
---------------------------------------------------------
|
90
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
92
|
+
--------------------------------------------------------------------------------------------------------
|
93
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
94
|
+
--------------------------------------------------------------------------------------------------------
|
95
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
97
|
+
-------------------------------------------------------------------------------------------------------------------------
|
98
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
99
|
+
-------------------------------------------------------------------------------------------------------------------------
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
102
|
+
------------------------------------------------------------------------
|
103
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
104
|
+
------------------------------------------------------------------------
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
107
|
+
-------------------------------------------------------------------------
|
108
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
109
|
+
-------------------------------------------------------------------------
|
110
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
112
|
+
-------------------------------------------------------------------------
|
113
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
114
|
+
-------------------------------------------------------------------------
|
115
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
117
|
+
---------------------------------------------------------------
|
118
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
119
|
+
---------------------------------------------------------------
|
120
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
121
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
122
|
+
-------------------------------------------------------------
|
123
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
124
|
+
-------------------------------------------------------------
|
125
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
127
|
+
---------------------------------------------------------
|
128
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
129
|
+
---------------------------------------------------------
|
130
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
132
|
+
-----------------------------------------------------
|
133
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
134
|
+
-----------------------------------------------------
|
135
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
137
|
+
--------------------------------------------------------------------------------------------------------
|
138
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
139
|
+
--------------------------------------------------------------------------------------------------------
|
140
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
141
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
142
|
+
-------------------------------------------------------------------------------------------------------------------------
|
143
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
144
|
+
-------------------------------------------------------------------------------------------------------------------------
|
145
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
146
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
147
|
+
------------------------------------------------------------------------
|
148
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
149
|
+
------------------------------------------------------------------------
|
150
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
151
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
152
|
+
-------------------------------------------------------------------------
|
153
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
154
|
+
-------------------------------------------------------------------------
|
155
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
156
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
157
|
+
-------------------------------------------------------------------------
|
158
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
159
|
+
-------------------------------------------------------------------------
|
160
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
161
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
162
|
+
---------------------------------------------------------------
|
163
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
164
|
+
---------------------------------------------------------------
|
165
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
166
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
167
|
+
-------------------------------------------------------------
|
168
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
169
|
+
-------------------------------------------------------------
|
170
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
171
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
172
|
+
---------------------------------------------------------
|
173
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
174
|
+
---------------------------------------------------------
|
175
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
177
|
+
-----------------------------------------------------
|
178
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
179
|
+
-----------------------------------------------------
|
180
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
181
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
182
|
+
--------------------------------------------------------------------------------------------------------
|
183
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
184
|
+
--------------------------------------------------------------------------------------------------------
|
185
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
187
|
+
-------------------------------------------------------------------------------------------------------------------------
|
188
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
189
|
+
-------------------------------------------------------------------------------------------------------------------------
|
190
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
191
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
192
|
+
------------------------------------------------------------------------
|
193
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
194
|
+
------------------------------------------------------------------------
|
195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
196
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
197
|
+
-------------------------------------------------------------------------
|
198
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
199
|
+
-------------------------------------------------------------------------
|
200
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
201
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
202
|
+
-------------------------------------------------------------------------
|
203
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
204
|
+
-------------------------------------------------------------------------
|
205
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
206
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
207
|
+
---------------------------------------------------------------
|
208
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
209
|
+
---------------------------------------------------------------
|
210
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
211
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
212
|
+
-------------------------------------------------------------
|
213
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
214
|
+
-------------------------------------------------------------
|
215
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
216
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
217
|
+
---------------------------------------------------------
|
218
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
219
|
+
---------------------------------------------------------
|
220
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
221
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
222
|
+
-----------------------------------------------------
|
223
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
224
|
+
-----------------------------------------------------
|
225
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
226
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
227
|
+
--------------------------------------------------------------------------------------------------------
|
228
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
229
|
+
--------------------------------------------------------------------------------------------------------
|
230
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
231
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
232
|
+
-------------------------------------------------------------------------------------------------------------------------
|
233
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
234
|
+
-------------------------------------------------------------------------------------------------------------------------
|
235
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
236
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
237
|
+
------------------------------------------------------------------------
|
238
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
239
|
+
------------------------------------------------------------------------
|
240
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
241
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
242
|
+
-------------------------------------------------------------------------
|
243
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
244
|
+
-------------------------------------------------------------------------
|
245
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
246
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
247
|
+
-------------------------------------------------------------------------
|
248
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
249
|
+
-------------------------------------------------------------------------
|
250
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
251
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
252
|
+
---------------------------------------------------------------
|
253
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
254
|
+
---------------------------------------------------------------
|
255
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
256
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
257
|
+
-------------------------------------------------------------
|
258
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
259
|
+
-------------------------------------------------------------
|
260
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
261
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
262
|
+
---------------------------------------------------------
|
263
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
264
|
+
---------------------------------------------------------
|
265
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
266
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
267
|
+
-----------------------------------------------------
|
268
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
269
|
+
-----------------------------------------------------
|
270
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
271
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
272
|
+
--------------------------------------------------------------------------------------------------------
|
273
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
274
|
+
--------------------------------------------------------------------------------------------------------
|
275
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
276
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
277
|
+
-------------------------------------------------------------------------------------------------------------------------
|
278
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
279
|
+
-------------------------------------------------------------------------------------------------------------------------
|
280
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
281
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
282
|
+
------------------------------------------------------------------------
|
283
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
284
|
+
------------------------------------------------------------------------
|
285
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
286
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
287
|
+
-------------------------------------------------------------------------
|
288
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
289
|
+
-------------------------------------------------------------------------
|
290
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
291
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
292
|
+
-------------------------------------------------------------------------
|
293
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
294
|
+
-------------------------------------------------------------------------
|
295
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
296
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
297
|
+
---------------------------------------------------------------
|
298
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
299
|
+
---------------------------------------------------------------
|
300
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
301
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
302
|
+
-------------------------------------------------------------
|
303
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
304
|
+
-------------------------------------------------------------
|
305
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
306
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
307
|
+
---------------------------------------------------------
|
308
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
309
|
+
---------------------------------------------------------
|
310
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
311
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
312
|
+
-----------------------------------------------------
|
313
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
314
|
+
-----------------------------------------------------
|
315
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
316
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
317
|
+
--------------------------------------------------------------------------------------------------------
|
318
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
319
|
+
--------------------------------------------------------------------------------------------------------
|
320
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
321
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322
|
+
-------------------------------------------------------------------------------------------------------------------------
|
323
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
324
|
+
-------------------------------------------------------------------------------------------------------------------------
|
325
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
326
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
327
|
+
------------------------------------------------------------------------
|
328
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
329
|
+
------------------------------------------------------------------------
|
330
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
331
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
332
|
+
-------------------------------------------------------------------------
|
333
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
334
|
+
-------------------------------------------------------------------------
|
335
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
336
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
337
|
+
-------------------------------------------------------------------------
|
338
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
339
|
+
-------------------------------------------------------------------------
|
340
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
342
|
+
---------------------------------------------------------------
|
343
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
344
|
+
---------------------------------------------------------------
|
345
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
346
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
347
|
+
-------------------------------------------------------------
|
348
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
349
|
+
-------------------------------------------------------------
|
350
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352
|
+
---------------------------------------------------------
|
353
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
354
|
+
---------------------------------------------------------
|
355
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
356
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
357
|
+
-----------------------------------------------------
|
358
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
359
|
+
-----------------------------------------------------
|
360
|
+
[1m[35m (0.1ms)[0m 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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
data/test/support/foo.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
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
|
+
require 'faker'
|
7
|
+
require 'pry'
|
8
|
+
|
9
|
+
Rails.backtrace_cleaner.remove_silencers!
|
10
|
+
|
11
|
+
# Load support files
|
12
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
13
|
+
|
14
|
+
# Load fixtures from the engine
|
15
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
16
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
17
|
+
end
|