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
Frederick Cheung
2009-Jul-08 14:36 UTC
Re: ActiveSupport::TestCase does not respond to "get" or "post"
On Jul 8, 4:28 pm, Beta <beta.zili...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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> > Thanks in advance, > Beta