por ejemplo
class Post < ActionController::Base
...
def new
@post = Post.new
end
...
end
en tu PostControllerTest haces:
class PostControllerTest < Test::Unit::TestCase
def test_new_post
@post = assigns(:post)
#o
assert @post
assert assigns(:post)
end
Suerte,
Juergen
On Sep 17, 2009, at 11:27 AM, dwayne wrote:
Hola,
una pregunta de testeo.
Cómo hay para chekear si el controller le asignó un valor
determinado a una variable instance variable.
Uso Test::Unit y Shoulda
tante gratzie
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar