Topic: Upgrade to 2.0.2 killed functional test


I have the following functional test, which was working just fine in 2.0.1:

def test_should_get_index
    login_as :quentin
    get :index
    assert_response :success

The index action itself does nothing at all except render the view, which in turn renders a partial.  It's worth mentioning that I also have an application.html.erb layout file in layouts.

def index
    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => nil }

Anyway, since I've upgraded to 2.0.2 the test no longer passes. 

 1) Error:
ActionView::ActionViewError: Couldn't find template file for layouts/application in ["/home/duncan/obz/dev/src/obztime/app/views"]
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:312:in `render_file'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:268:in `render_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/mime_responds.rb:131:in `custom'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/mime_responds.rb:152:in `respond'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/mime_responds.rb:150:in `respond'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/mime_responds.rb:107:in `respond_to'
    /home/duncan/obz/dev/src/obztime/app/controllers/projects_controller.rb:14:in `index'

However, the action itself still works; if I navigate to it with a browser everything renders just fine, including the layout specified in application.html.erb.

Am I missing something here?  Is anyone else experiencing this problem with 2.0.2?

Duncan Bayne

Re: Upgrade to 2.0.2 killed functional test

What status code is returned? What was it before? Use one of those firefox extensions that acts as a sniffer.

This is one of the cool benefits of TDD, you get to learn every nuances and intricacies of your language of choice.

Re: Upgrade to 2.0.2 killed functional test

Duncan -

I have experienced this same problem.  Did you find a resolution to it?