# Restful authentication: integration testing

**URL:** <https://www.ruby-forum.com/t/restful-authentication-integration-testing/159991>\
**Category:** Rails\
**Created:** [February 10, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/restful-authentication-integration-testing/159991 "2009-02-10T19:39:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsastickup](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7feea3/32.png) [@itsastickup](https://www.ruby-forum.com/u/itsastickup)\
**Post date:** [February 10, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/restful-authentication-integration-testing/159991/1 "2009-02-10T19:39:58Z")

</div>

Hi,

Anyone know how to do integration testing with the “Restful  
Authentication” plugin?

I’ve been trying this, without luck :

def login\_session(user)  
open\_session do |sess|  
sess.extend(CustomDsl)  
sess.extend(AuthenticatedTestHelper); #\<\<my clever idea  
sess.login\_as(users(user))#\<\<won’t work  
end  
end

but predictably it splats on the last line. Various objects aren’t  
available to the helper code.

What should I be doing?

thanks
