Skip to content

Instantly share code, notes, and snippets.

@thumblemonks
Created January 13, 2010 17:41
Show Gist options
  • Save thumblemonks/276393 to your computer and use it in GitHub Desktop.
Save thumblemonks/276393 to your computer and use it in GitHub Desktop.
test:
adapter: sqlite3
database: ":memory:"
def shhhh(&block)
old_output, $stdout = $stdout, StringIO.new
yield
ensure
$stdout = old_output
end
shhhh do # Need for SQLite, in-memory DB only
load File.join(File.dirname(__FILE__), '../db/schema.rb')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment