Forum: Ruby on Rails integration: assert_template() always fails...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
36958dd94ca666a38483df282a5214d5?d=identicon&s=25 unknown (Guest)
on 2006-05-13 11:51
(Received via mailing list)
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
This topic is locked and can not be replied to.