NoMethodError: undefined method `response_code' for nil:NilClass

299 views
Skip to first unread message

rtacconi

unread,
Aug 4, 2010, 11:44:44 AM8/4/10
to shoulda
I have this error

Started
.................E...........................
1) Error:
test: render some pages and respond with success should respond with
200. (ConfigurationsControllerTest):
NoMethodError: undefined method `response_code' for nil:NilClass
shoulda (2.11.3) lib/shoulda/action_controller/matchers/
respond_with_matcher.rb:57:in `response_code'
shoulda (2.11.3) lib/shoulda/action_controller/matchers/
respond_with_matcher.rb:48:in `correct_status_code?'
shoulda (2.11.3) lib/shoulda/action_controller/matchers/
respond_with_matcher.rb:30:in `matches?'
shoulda (2.11.3) lib/shoulda/assertions.rb:53:in `assert_accepts'
shoulda (2.11.3) lib/shoulda/context.rb:324:in
`__bind_1280936727_792173'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `call'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `test: render some
pages and respond with success should respond with 200. '
Finished in 2.351761 seconds.
45 tests, 59 assertions, 0 failures, 1 errors, 0 pendings, 0
omissions, 0 notifications
0% passed

rtacconi

unread,
Aug 4, 2010, 12:18:26 PM8/4/10
to shoulda
sorry I was using test-unit gem with Ruby 1.8.7. It seems that is
designed for 1.9
Reply all
Reply to author
Forward
0 new messages