search for: user_controller_test

Displaying 16 results from an estimated 16 matches for "user_controller_test".

2005 Dec 23
1
Salted Login Error
Anyone know what''s causing this? ------------------------------------------------------------------------ 1) Error: test_delete(UserControllerTest): NoMethodError: undefined method `advance_by_days='' for Time:Class ./test/functional/user_controller_test.rb:132:in `test_delete'' 2) Error: test_signup(UserControllerTest): NoMethodError: undefined method `advance_by_days='' for Time:Class ./test/functional/user_controller_test.rb:51:in `do_test_signup'' ./test/functional/user_controller_test.rb:145:in `test_signup...
2005 Jul 05
2
Salted hash login generator (verification problem?)
...tivesupport (1.0.4) localization_generator (1.0.7) login_generator (1.1.0) rails (0.12.1) rake (0.5.4) RedCloth (3.0.3) salted_login_generator (1.0.9) sources (0.0.1) ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ rake_test_loader.rb" "test/functional/user_controller_test.rb" "test/functional/admin/summary_controller_test.rb" ./test/functional/admin/../../../config/environment.rb:1: warning: already initialized constant RAILS_ROOT ./test/functional/admin/../../../config/environment.rb:2: warning: already initialized constant RAILS_ENV ./test/fun...
2005 May 18
10
Salted Login Generator issues
Hello all, I''ve just installed and begun to integrate the salted login generator. So far I''m very impressed, though I''ve hit a few snags along the way. Unfortunately, I''ve met the first one that I haven''t been able to resolve on my own. When I hit the login action, I get errors in my log files. The specific error with trace is included below.
2006 Jun 17
3
What is this failure trying to tell me?
...t;, :password => "test"} assert_response :redirect assert_session_has :user assert_redirected_to :action => ''welcome'' Here is the failure I''m getting when I run my tests. 2) Failure: test_login_required(UserControllerTest) [test/functional/user_controller_test.rb:122]: response is not a redirection to all of the options supplied (redirection is <"http://test.host/user/welcome">), difference: <{:controller=>"user"}> assert_redirected_to :action => ''welcome'' should mean :controller is set to the c...
2011 Jul 05
4
Problem of "rake spec"
Hi all, I am a bit confused when i type rake spec and it gives me this message, No examples matching ./spec/**/*_spec.rb could be found what is that mean that something is not found. and where i can input my the test code because i did have a tiny sample code in user_controller_test.rb. is that the right place to test functional.. plz give me a help thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org...
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
...local/bin/ruby -Ilib:test "/opt/local/lib/ruby/gems/1.8/gems/ rake-0.7.1/lib/rake/rake_test_loader.rb" "test/functional/ admin_controller_test.rb" "test/functional/error_controller_test.rb" "test/functional/poll_controller_test.rb" "test/functional/ user_controller_test.rb" ./test/functional/../test_helper.rb:18: undefined method `use_transactional_fixtures='' for Test::Unit::TestCase:Class (NoMethodError) from ./test/functional/admin_controller_test.rb:1 from /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/ rake_test_load...
2007 Mar 22
1
Functional test and flash with an error
...ag, but no tag found matching {:content=>"User James Apps was successfully created.", :attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb. I tried using a regular expression - /#{user.first_name}/ , but that wouldn''t work either user_controller_test.rb 1) Failure: test_create(Admin::UserControllerTest) [/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/assertions/tag_assertions.rb:102:in `assert_tag'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/assertions/tag_assertions.rb:99:in `cle...
2006 Feb 27
1
Functional test problem with environments variables
...#39;123''} it works in the controller and when i run the application, i managed to get the values out from the development.rb by using some statements like @user = [''USER_DETAILS''].name. But when i code the functional test, even the most simple test like test_index in user_controller_test, it failed and result in this error : NameError: uninitialized constant USER_DETAILS inside the test_index is like this: class UserControllerTest < Test::Unit::TestCase def setup @user = User.new end def test_index get :index assert_response :success end end Is there anythi...
2008 Mar 01
0
Fixtures in ActionController::TestCase
...post :login, :user => { :login => user.login, :password => user.password } end Running the test: ... 1) Error: do_something(UserControllerTest): NoMethodError: You have a nil object when you didn''t expect it! The error occurred while evaluating nil.login test/functional/user_controller_test.rb:41:in `attempt_login'' test/functional/user_controller_test.rb:32:in `do_something'' /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ testing/default.rb:7:in `run'' * I tried putting fixtures :users within setup, still the same problem. This wo...
2010 Jul 25
0
Testing problems: ActiveSupport
...e first one, but I''m not sure about the ActiveSupport errors): Exception: undefined method `screen_name'' for nil:NilClass C:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/whiny_nil.rb:52:in `method_missing'' D:/Projects/RailsSpace/test/functional/user_controller_test.rb:39:in `try_to_login'' D:/Projects/RailsSpace/test/functional/user_controller_test.rb:28:in `testing_logout'' C:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/testing/setup_and_teardown.rb:62:in `run'' C:/Ruby191/lib/ruby/gems/1.9.1/gems/test-unit...
2007 Dec 05
1
rake error - please help
...an someone please tell me what this error means?: bbgun@echobase:~/RailsProjects/rails_space$ rake test:functionals (in /home/bbgun/RailsProjects/rails_space) /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb" "test/functional/user_controller_test.rb" "test/functional/community_controller_test.rb" "test/functional/faq_controller_test.rb" "test/functional/spec_controller_test.rb" "test/functional/profile_controller_test.rb" "test/functional/site_controller_test.rb" /home/bbgun/RailsProjec...
2006 Jul 11
0
assert_redirected_to not recognizing routes
...directed_to'' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/assertions.rb:313:in `clean_backtrace'' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/assertions.rb:74:in `assert_redirected_to'' ./test/functional/user_controller_test.rb:31:in `test_signin'' My signin method redirects the user to ''/'' if they request the signin page directly as is happening in this functional test. This route gets translated to :controller => ''user'', :action => ''list''. So the...
2006 May 03
0
Accessing the params hash in a functional test not working
...ls as follows. Note that session[:debug_params] is missing the parameters sent by post. 7) Failure: test_auth_bob(UserControllerTest) [c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1 /lib/action_controller/depr ecated_assertions.rb:23:in `assert_session_has'' ./test/functional/user_controller_test.rb:25:in `test_auth_bob'']: <:user> is not in the session <#<ActionController::TestSession:0x36a8380 @attributes= {:user=>nil, :debug_params=>{"action"=>"login"}, "flash"=> {:error=>"The email address and/or password...
2007 Jan 21
0
Functional Test Fails with before filter in application.rb
...#39; /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/assertions.rb:60:in `clean_backtrace'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/assertions/response_assertions.rb:35:in `assert_redirected_to'' test/functional/user_controller_test.rb:24:in `test_index_with_user'' The controller I am testing is user_controller.rb THe check_auth functions are in the application.rb Would this break it? Is there some way around this or have i just been staring too long and missedsomething? Thanks. THE TEST: in user_contorller_test.rb...
2008 Jul 10
0
User.protected_attributes returning empty Set instead of nil -- causing activerecord/lib/base:2307 to raise
...`update'' The model doesnt use attr_protected. It turns out that User.protected_attributes is returning an empty set instead of nil, which is what remove_attributes_protected_from_mass_assignment wants. The real fun part is that this only happens in tests (rake test:functional or ruby ./user_controller_test.rb). And for a real kick in the crotch, I''ve seen it in development but only once in about 50 tries. Anyone ever seen this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou...
2006 Jan 10
5
Oracle 10g Express - generate scaffold gives error
...create test/fixtures/user.yml E:\radrails\projects\MPS>ruby script\generate controller users exists app/controllers/ exists app/helpers/ create app/views/user create test/functional/ create app/controllers/user_controller.rb create test/functional/user_controller_test.rb create app/helpers/user_helper.rb and I modified user_controller.rb like this: class UserController < ApplicationController scaffold :user end I booted WebRick E:\radrails\projects\MPS>ruby script/server => Booting WEBrick... => Rails application started on http://0.0.0.0...