Displaying 3 results from an estimated 3 matches for "productscontrollertest".
2006 May 04
3
@products["car"] is not being recognized in my tests!! help
@products["car"] is not being recognized in my tests:
class ProductsControllerTest < Test::Unit::TestCase
fixtures :products
def test_view_product
post :view_product, :id=>@products["car"].id
assert_template "view_product"
...
end
end
products.yml :
car:
id:1
name:test
Does anyone have any idea why its not working?
Im having to...
2006 May 04
0
@products["car"] to access fixtures isn''t working in tests
class ProductsControllerTest < Test::Unit::TestCase
fixtures :products
end
--
Posted via http://www.ruby-forum.com/.
2006 Sep 26
0
some help with functional testing of nested routes
...st in test/functional for testing my
products_controller:
require File.dirname(__FILE__) + ''/../test_helper''
require ''products_controller''
# Re-raise errors caught by the controller.
class ProductsController
def rescue_action(e)
raise e
end
end
class ProductsControllerTest < Test::Unit::TestCase
fixtures :products, :categories
def setup
@controller = ProductsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@first_id = products(:first).id
@category_id = categories(:first).id...