[Ironruby-core] Got a slightly more ambitious Rails functional test running

John Lam (IRONRUBY) jflam at microsoft.com
Sat May 24 00:56:51 EDT 2008

Here's the controller:

class SayController < ApplicationController
  def hello
    @name = 'john'

Here's the view template:

    <title>Say Hello</title>
    <h1>Hello, <%= @name%></h1>

Here's the functional test:

require File.dirname(__FILE__) + '/../test_helper'

class SayControllerTest < ActionController::TestCase
  def test_hello
    get :hello
    assert_template "say/hello"
    assert_response :success
    assert_tag :tag => "h1", :child => /john/

It hits a case where Rail uses Kernel#loop, so I implemented it.

It uncovered a couple of problems with how we implemented Hash#each*. Ruby hashes can be modified from within the blocks that we yield to, but we were using foreach () to iterate over the underlying Dictionary<object, object>.

Both of these fixes are on my machine, and I'll submit later once I get a connection back to corpnet.

We have WEBrick nearly running now. We are currently blocking on IO#select.


More information about the Ironruby-core mailing list