# ActiveSupport::TestCase does not respond to "get" or "post"

**URL:** <https://www.ruby-forum.com/t/activesupport-testcase-does-not-respond-to-get-or-post/171751>\
**Category:** Rails\
**Created:** [July 8, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/activesupport-testcase-does-not-respond-to-get-or-post/171751 "2009-07-08T16:36:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@Beta](https://www.ruby-forum.com/u/Beta)\
**Post date:** [July 8, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/activesupport-testcase-does-not-respond-to-get-or-post/171751/1 "2009-07-08T16:36:54Z")

</div>

Hi everybody,

I’m upgrading an app from rails 1.2.3 to rails 2.3.2. I’ve a problem  
with the controllers tests. At the beginning, a test was defined as

class XControllerTest \< Test::Unit::TestCase  
import\_fixtures :fix1, :fix2, …

def test\_something  
get :something, {:some =\> ‘Params’} , {}  
assert\_response :success  
…  
end

The import\_fixtures fails, and I’ve read that the new way to do this  
is with ActiveSupport::TestCase. But if I change  
Test::Unit::TestCase by ActiveSupport::TestCase, I get the error

NoMethodError: undefined method `get’ for #\<XControllerTest:  
0xb7cbd560\>

What can it be? What can I do?

Thanks in advance,  
Beta

---

<div class="post-metadata">

**Author:** ![Beta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@Beta](https://www.ruby-forum.com/u/Beta)\
**Post date:** [July 8, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/activesupport-testcase-does-not-respond-to-get-or-post/171751/2 "2009-07-08T16:36:54Z")

</div>

On Jul 8, 4:28 pm, Beta [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The import\_fixtures fails, and I’ve read that the new way to do this  
> is with ActiveSupport::TestCase. But if I change  
> Test::Unit::TestCase by ActiveSupport::TestCase, I get the error
> 
> NoMethodError: undefined method `get’ for #\<XControllerTest:  
> 0xb7cbd560\>
> 
> What can it be? What can I do?

You should be subclassing from ActionController::TestCase

Fred
