class <%= pluralize camelize(name) %>ControllerTest < FunctionalTestCase def setup <%= module_name %>::<%= camelize name %>.delete_all end def test_get_<%= name %>_by_id <%= name %> = <%= camelize name %>Factory.post get "/<%= pluralize name %>/#{<%= name %>._id}" assert_equal 200, last_response.status end def test_get_<%= pluralize name %> 3.times { <%= camelize name %>Factory.post } get "/<%= pluralize name %>" assert_equal 200, last_response.status end end