search for: my_inst_vars

Displaying 1 result from an estimated 1 matches for "my_inst_vars".

2005 Mar 09
9
Unit testing + instance variables
...r::TestRequest.new @response = ActionController::TestResponse.new create_fixtures "recipes" create_fixtures "categories" end def test_list get :list # This step seems exessively complex, and took me a while to figure out my_inst_vars = @controller.instance_variable_get "@assigns" assert_equal( 5, my_inst_vars["recipes"].size ) assert_equal( 8, my_inst_vars["categories"].size ) end end