Hi
I have upgraded to 2.3.2 and changed updated everything inside
myproject :
This is my functional TEST :
require ''test_helper''
class Admin::ProjectsControllerTest < ActiveSupport::TestCase
def test_get_index
get :index
assert_response :success
assert_not_nil assigns(:projects)
end
end
This is my console :
s128:test pietia$ ruby functional/admin/projects_controller_test.rb
Loaded suite functional/admin/projects_controller_test
Started
E
Finished in 0.119872 seconds.
1) Error:
test_get_index(Admin::ProjectsControllerTest):
NoMethodError: undefined method `get'' for
#<Admin::ProjectsControllerTest:0x25f0df0>
functional/admin/projects_controller_test.rb:6:in `test_get_index''
1 tests, 0 assertions, 0 failures, 1 errors
Project_controller have index method and it works in browser.
I dont have idea how to solve it, google also don''t give me any
answers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On 25 Mar 2009, at 16:37, Pietia wrote:> > Hi > > I have upgraded to 2.3.2 and changed updated everything inside > myproject : > > > This is my functional TEST : > > require ''test_helper'' > > class Admin::ProjectsControllerTest < ActiveSupport::TestCaseYou should have changed that to ActionController::TestCase. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Mar 25, 2009 at 11:37 AM, Pietia <peter.kaleta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have upgraded to 2.3.2 and changed updated everything inside > myproject : > > This is my functional TEST : > > require ''test_helper'' > > class Admin::ProjectsControllerTest < ActiveSupport::TestCaseYou need "fixtures :projects" here.> def test_get_index > get :index > assert_response :success > assert_not_nil assigns(:projects) > end > > end-- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Pietia wrote:> class Admin::ProjectsControllerTest < ActiveSupport::TestCaseShouldn''t that be like ActiveController::TestCase ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ty fred, your solution worked , i just didnt notice that it should derive from action controller ( i copied heading from unit test ) On 25 Mar, 19:08, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 25 Mar 2009, at 16:37, Pietia wrote: > > > > > Hi > > > I have upgraded to 2.3.2 and changed updated everything inside > > myproject : > > > This is my functional TEST : > > > require ''test_helper'' > > > class Admin::ProjectsControllerTest < ActiveSupport::TestCase > > You should have changed that to ActionController::TestCase. > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---