public
Last active

  • Download Gist
OUTPUT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
mickael@mickael-laptop:~/projects/pabd/test$ ruby functional/hr/alert_collaborators_controller_test.rb
Loaded suite functional/hr/alert_collaborators_controller_test
Started
...........EEEE..................
Finished in 5.916115 seconds.
 
1) Error:
test: logged in on GET to index should not set the flash. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936275_9516'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should not set the flash. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
2) Error:
test: logged in on GET to index should render template :index. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936275_254870'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should render template :index. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
3) Error:
test: logged in on GET to index should render with the "application" layout. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936275_383441'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should render with the "application" layout. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
4) Error:
test: logged in on GET to index should respond with success. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936275_617389'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should respond with success. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
33 tests, 46 assertions, 0 failures, 4 errors
mickael@mickael-laptop:~/projects/pabd/test$
mickael@mickael-laptop:~/projects/pabd/test$ ruby functional/hr/alert_collaborators_controller_test.rb
Loaded suite functional/hr/alert_collaborators_controller_test
Started
.................................
Finished in 5.876578 seconds.
 
33 tests, 50 assertions, 0 failures, 0 errors
mickael@mickael-laptop:~/projects/pabd/test$ ruby functional/hr/alert_collaborators_controller_test.rb
Loaded suite functional/hr/alert_collaborators_controller_test
Started
...........EEEE..................
Finished in 6.033178 seconds.
 
1) Error:
test: logged in on GET to index should not set the flash. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936930_784222'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should not set the flash. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
2) Error:
test: logged in on GET to index should render template :index. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936931_35949'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should render template :index. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
3) Error:
test: logged in on GET to index should render with the "application" layout. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936931_162870'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should render with the "application" layout. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
4) Error:
test: logged in on GET to index should respond with success. (Hr::AlertCollaboratorsControllerTest):
ActionView::TemplateError: undefined method `just_raise_that_exception' for I18n:Module
On line #13 of app/views/hr/alert_collaborators/index.html.erb
10: <% @alert_collaborators_agency.each do |hr_alert| %>
11: <tr>
12: <td><%=h hr_alert.collaborator.full_name %></td>
13: <td><%= link_to I18n.t('action_show_ERROR_TRANSLATION'), hr_alert_collaborator_path(hr_alert) %></td>
14: <td><%= link_to t('action_edit'), edit_hr_alert_collaborator_path(hr_alert) %></td>
15: <td><%= link_to t('action_destroy'), hr_alert_collaborator_path(hr_alert), :confirm => t('action_are_you_sure'), :method => :delete %></td>
16: </tr>
app/views/hr/alert_collaborators/index.html.erb:13
app/views/hr/alert_collaborators/index.html.erb:10:in `each'
app/views/hr/alert_collaborators/index.html.erb:10
vendor/gems/resource_controller-0.6.6/lib/resource_controller/helpers/internal.rb:12:in `response_for'
vendor/gems/resource_controller-0.6.6/lib/resource_controller/actions.rb:7:in `index'
/test_helper.rb:60:in `__bind_1278936931_413045'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `call'
shoulda (2.10.3) lib/shoulda/context.rb:380:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `each'
shoulda (2.10.3) lib/shoulda/context.rb:379:in `run_current_setup_blocks'
shoulda (2.10.3) lib/shoulda/context.rb:361:in `test: logged in on GET to index should respond with success. '
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:279
functional/hr/alert_collaborators_controller_test.rb:4
 
33 tests, 46 assertions, 0 failures, 4 errors
alert_collaborators_controller_test.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
require 'test_helper'
 
class Hr::AlertCollaboratorsControllerTest < ActionController::TestCase
context "logged in" do
setup do
UserSession.create(Factory(:user))
Factory(:agency)
Factory(:feedback)
@alert_collaborator = Factory.stub(:alert_collaborator)
@alert_collaborator.id = 1001
 
AlertCollaborator.stubs(:find).returns(@alert_collaborator)
AlertCollaborator.stubs(:find).with(:all, anything).returns([@alert_collaborator])
end
 
should_get_action :index
should_get_action :new
 
context "on POST to :create (valid data)" do
setup do
AlertCollaborator.any_instance.expects(:save).returns(true).once
AlertCollaborator.any_instance.stubs(:id).returns(1001)
 
post :create, :alert_collaborator => {}
end
 
should_assign_to :alert_collaborator, :class => AlertCollaborator
should_respond_with :redirect
should_redirect_to("alert_collaborator index page"){hr_alert_collaborators_path}
end
 
context "on POST to :create (invalid data)" do
setup do
AlertCollaborator.any_instance.expects(:save).returns(false).once
post :create, :alert_collaborator => {}
end
 
should_assign_to :alert_collaborator, :class => AlertCollaborator
should_respond_with :success
should_render_with_layout
should_render_template :new
should_not_set_the_flash
end
 
context "on GET to :show" do
setup do
get :show, {:id => @alert_collaborator.id}
end
 
should_respond_with :success
should_render_with_layout
should_render_template :show
should_not_set_the_flash
end
 
context "on GET to :edit" do
setup do
get :edit, :id => @alert_collaborator.id
end
 
should_respond_with :success
should_render_with_layout
should_render_template :edit
should_not_set_the_flash
end
 
context "on PUT to :update (valid data)" do
setup do
@alert_collaborator.expects(:update_attributes).returns(true).once
put :update, :id => @alert_collaborator.id, :alert_collaborator => {}
end
 
should_assign_to :alert_collaborator, :class => AlertCollaborator
should_respond_with :redirect
should_redirect_to("alert_collaborator index page"){hr_alert_collaborators_path}
end
context "on PUT to :update (invalid data)" do
setup do
@alert_collaborator.expects(:update_attributes).returns(false).once
put :update, :id => @alert_collaborator.id, :alert_collaborator => {}
end
 
should_assign_to :alert_collaborator, :class => AlertCollaborator
should_respond_with :success
should_render_template :edit
end
 
context "on DELETE to :destroy" do
setup do
@alert_collaborator.expects(:destroy).returns(true).once
delete :destroy, :id => @alert_collaborator.id
end
 
should_assign_to(:alert_collaborator){@alert_collaborator}
should_respond_with :redirect
should_redirect_to("alert_collaborator index page"){hr_alert_collaborators_path}
end
end
end
test_helper.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require 'factory_girl'
require 'shoulda'
require 'faker'
require "authlogic/test_case"
require 'i18n'
 
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded
# between every test method. Fewer database queries means faster tests.
#
# Read Mike Clark's excellent walkthrough at
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
#
# Every Active Record database supports transactions except MyISAM tables
# in MySQL. Turn off transactional fixtures in this case; however, if you
# don't care one way or the other, switching from MyISAM to InnoDB tables
# is recommended.
#
# The only drawback to using transactional fixtures is when you actually
# need to test transactions. Since your test is bracketed by a transaction,
# any transactions started in your code will be automatically rolled back.
self.use_transactional_fixtures = true
 
# Instantiated fixtures are slow, but give you @david where otherwise you
# would need people(:david). If you don't want to migrate your existing
# test cases which use the @david style and don't mind the speed hit (each
# instantiated fixtures translates to a database query per test method),
# then set this back to true.
self.use_instantiated_fixtures = false
 
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
#fixtures :all
end
 
module I18n
def just_raise_that_exception(*args)
raise args.first
end
end
 
class ActionController::TestCase
setup :activate_authlogic
I18n.exception_handler = :just_raise_that_exception
 
Factory(:agency) unless Agency.first.nil?
Factory(:feedback) unless Feedback.first.nil?
end
 
def should_get_action(action)
context "on GET to #{action}" do
setup do
get action
end
 
should_respond_with :success
should_render_with_layout
should_render_template action
should_not_set_the_flash
end
end

In this context, Exception is raise, but there is a problem about "undefined method `just_raise_that_exception'".
And in a second hand, why i must specify I18n.t whereas #t method is an alias ? isn't it ?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.