3-0-unstable Merge

During the hackfest in Chicago, we finally merged my ActionView changes into 3-0-unstable, the official Rails next branch. Josh's ActionDispatch reorg (moving dispatching related things to their own top-level directory under ActionPack), which continues to leverage Rack, was also merged in.

Unfortunately, the merge produced a fair number of test failures, and I spent today fixing them. A few of the failures were legitimate, but going to be corrected in Rails3 significantly differently than they were implemented (for Rails 2.3) in the past. I wanted a "pending" classification, as in rspec, but unfortunately Test::Unit 1 (which is currently used by Rails) has no such thing. I searched github for and found a quick hack by Jeremy McAnally that half fit the bill. It printed a "P" when a test was pending, but never printed a list of pending specs. I modified Jeremy's code to add support for printing the pending specs at the end. It is available as part of ActiveSupport::TestCase in 3-0-unstable.

The syntax is:

def test_should_implicitly_render_html_template_from_xhr_request  
  pending do
    get :render_implicit_html_template_from_xhr_request, :format => :js
    assert_equal "Hello HTML!", @response.body
  end
end  

When combined with the new declarative testing style in Rails 2.3, you can do:

test "implicitly renders an html template from XHR requests" do  
  pending do
    get :render_implicit_html_template_from_xhr_request, :format => :js
    assert_equal "Hello HTML!", @response.body
  end
end  

Anyhow, after adding support for pending, 3-0-unstable is green again!