Hello Keith,

2006/8/17, Keith Morrison <[EMAIL PROTECTED]>:
Comments, questions, suggestions?

My tests are defined like this now:

# test/functional/admin_controller_test.rb
class UnauthenticatedAccessToAdminSectionTest < Test::Unit::TestCase
 def setup
   @controller = AdminController.new
   ....

   get :index
 end

 def test_redirected_to_login
    assert ...
 end

 def test_warns_in_flash
    assert ...
 end

 def test_logs_unauthorized_access_to_admin
    assert ...
 end
end

class AuthenticatedAccessToAdminSectionTest < Test::Unit::TestCase
 def setup
   @controller = AdminController.new
   @request.session[:user] = ...

   get :index
 end

 def test_allows_access
   assert ...
 end
end

So, with TestInjector, my tests will still need to define @controller,
right ?  And reopen the right class ?  Seems like your plugin would
not be very good for me at this time.  Unless there was a way it could
get at the filename ?  Probably not going to be easy.

Thanks !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to