search for: authenticated_test_helper

Displaying 6 results from an estimated 6 matches for "authenticated_test_helper".

2007 Apr 06
0
ruby doc errorr
authenticated_test_helper.rb: m. RDoc failure in vendor/plugins/acts_as_authenticated/generators/authenticated/te mplates/authenticated_test_helper.rb at or around line 113 column 4 Before reporting this, could you check that the file you''re documenting compiles cleanly--RDoc is not a full Ruby parser, and gets c...
2007 Apr 06
0
rdoc error
I am getting this error when I run ruby doc with following command rdoc -a -F -f html -S -N -o doc1 ...........authenticated_test_helper.rb: m. RDoc failure in vendor/plugins/acts_as_authenticated/generators/authenticated/te mplates/authenticated_test_helper.rb at or around line 113 column 4 Before reporting this, could you check that the file you''re documenting compiles cleanly--RDoc is not a full Ruby parser, and gets c...
2008 Jan 30
2
Stubbing controller methods vs model methods
...based on the subdomain. This method is stubbed out for the tests. def find_account @account = Account.for(request.host.split(".").first) #TODO: find out why request.subdomains returns [] end In my controller tests I would like to stub this method. So I created a method within the authenticated_test_helper.rb (I am using RESTful Authentication plugin) def login_with_account(account) # <=== # User current_user = mock_model(User) controller.stub!(:current_user).and_return(current_user) # User''s account account.stub!(:users).and_return([current_user]) current_use...
2006 Aug 06
2
assert_difference gives undefined method error in unit tests
Hi there Am hitting undefined method errors for ''assert_difference'' in my unit tests under Rails 1.1.4 What could I be missing? Richard Sandilands
2008 Jan 21
9
DRY act_as_authenticated functional testing
I''m using the acts_as_authenticated plug-in for my app. Now I need to get my functional tests to work properly. I have not written functional tests before so I''m unsure how to utilize setup so that all of my tests can use the login. My tests pass if I put login_as :user inside of each test, but that''s clearly not DRY. Can I add something to my test_helper.rb file or
2007 May 29
12
questions rspec on rails
...ndations for using authentication? should i load a users.yml fixture or setup users some other way? (my controllers and views may check for current_user, logged_in?, etc) (I use restful_authentication) - this may not be rspec at all, I''m calling assert_difference (defined in /lib/authenticated_test_helper.rb) with 3 args but get an error that it expects 2. Is there another version of this method somewhere? I cant find it. If i rename the one i know and call that (eg assert_difference3) its ok. - do any of you also use topfunky_power_tools (ref peepcode testing video) But I dont know how to...