pertl@gmx.org
2006-May-13 09:50 UTC
[Rails] integration: assert_template() always fails...
Hi Coders :-) Maybe somebody can help... My integration tests always fail when using assert_template() class ShopTest < ActionController::IntegrationTest def test_very_simple get("/shop/index") assert_success assert_template("/shop/index") end end the "/shop/index" is a valid url which renders flawlessly in the browser. however, the test will produce: 1) Failure: test_buy_an_article(ShopTest) [test/integration/shop_test.rb:22:in `test_buy_an_article'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/integration.rb:427:in `r un'']: expecting <"/shop/index"> but rendering with <"c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/templates/rescues/unknown_action.rhtml"> Any help greatly appreciated!!! Cheers Peter