Yehuda Katz is a member of the Ruby on Rails core team, and lead developer of the Merb project. He is a member of the jQuery Core Team, and a core contributor to DataMapper. He contributes to many open source projects, like Rubinius and Johnson, and works on some he created himself, like Thor.

Dear world, notoriety is NEGATIVE. (adj. the state of being known for some unfavorable act or quality); kthx

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!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Netvibes
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis

2 Responses to “3-0-unstable Merge”

Awesome man. That branch is looking better every day. Mind if I jack your code and merge it back into pending?

Go for it!

Leave a Reply