Hello, I'm very new with Ruby (and Rails), but I need to make a test
with testcase.
I made an application that use openid login (following Ryan Bates's
tutorial), where the session controller code is:
def create
if using_open_id?
open_id_authentication(params[:openid_url])
...
end
end
protected
def open_id_authentication(openid_url)
authenticate_with_open_id(...) do |result, identity_url, registration|
if result.successful?
...
end
end
end
I tried to create a stub with no luck (maybe I don't really know how it
works). I'd like to test the 'authenticate_with_open_id' block,
currently I'm using simplecov to check the coverage and stops in that
line.
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/24cb1e678b15b3c7b2e48ccba0a743f0%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment