A while back I wrote about the ActiveRecord stub I use to easily hack around with AR. I’ve altered it to just create in-memory sqlite databases, and also to silence AR::Migration. Here’s the updated version:
require 'rubygems'
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDOUT) if 'irb' == $0
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :dbfile => ':memory:')
ActiveRecord::Migration.verbose = false
ActiveRecord::Base.silence do
ActiveRecord::Schema.define(:version => 1) do
with_options :force => true do |m|
m.create_table 'examples' do |t|
t.string :title
t.timestamps
end
end
end
end
class Example < ActiveRecord::Base
end
if __FILE__ == $0
require 'test/unit'
class TestExample < Test::Unit::TestCase
def test_should_flunk
flunk
end
end
end


You must really love rubygems!
@mike: thanks! Fixed.