[rspec-users] How Can I inveke a code example in another one

zhjie685 zhjie685 at 126.com
Wed Oct 28 03:56:05 EDT 2009


Hi,
  I'm new to rspec.
  How could I transform the Unit:Tests code like
  
def test_logout
    login
    get :logout
    assert_not_logged_in
 end
 def assert_not_logged_in
    assert_block { session["user"].nil? }
 end

that a test method invoke another test method,to repec code.

Should I put them in one code example? or there is other way?

Thanks!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091028/afd97df7/attachment.html>


More information about the rspec-users mailing list