Founder and coder for Super + Fun, a social funware company. I also enjoy quilting, reading, and singing in the shower.

Test controllers with Facebooker Mock Sessions

To avoid login redirects when testing controllers that use Facebooker’s ensure_authenticated_to_facebook before_filter, use a mock session:

    get(:index, {}, {
      :facebook_session => Facebooker::MockSession.create})
    assert_response :success

Friday, February 12th, 2010

blog comments powered by Disqus