I have a model called "Post" which is a nested resource under a model called "Project" and I m trying to test the controller. The code works find in my browser, but I can t get it to work in the test. Here s the test
context "on POST to :edit" do
setup do
post( :edit,
:project_id => @project1.to_param,
:id => @post1.to_param,
:post => { :title => new title , :text => other text }
)
end
should_assign_to :post
should_assign_to :project
should_respond_with :success
should "update post values" do
assert_equal other text , assigns[ post ].text
end
Any idea how I m screwing this up?