Skip to content

Commit

Permalink
Silence schema creation so debug.log is easy to debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
metaskills committed Sep 21, 2008
1 parent 3d06ed3 commit 7ead06e
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,29 @@ def setup_environment(options={})
protected

def setup_database(options)
ActiveRecord::Base.connection.create_table :employees, :force => true do |t|
t.column :name, :string
t.column :email, :string
t.column options[:group_column], :integer
end
ActiveRecord::Base.connection.create_table :reports, :force => true do |t|
t.column :title, :string
t.column :body, :string
t.column :employee_id, :integer
end
ActiveRecord::Base.connection.create_table :legacy_employees, :force => true, :id => false do |t|
t.column :name, :string
t.column :email, :string
t.column options[:group_column], :integer
end
ActiveRecord::Base.connection.create_table :legacy_reports, :force => true do |t|
t.column :title, :string
t.column :body, :string
t.column :email, :string
ActiveRecord::Base.class_eval do
silence do
connection.create_table :employees, :force => true do |t|
t.column :name, :string
t.column :email, :string
t.column options[:group_column], :integer
end
connection.create_table :reports, :force => true do |t|
t.column :title, :string
t.column :body, :string
t.column :employee_id, :integer
end
connection.create_table :legacy_employees, :force => true, :id => false do |t|
t.column :name, :string
t.column :email, :string
t.column options[:group_column], :integer
end
connection.create_table :legacy_reports, :force => true do |t|
t.column :title, :string
t.column :body, :string
t.column :email, :string
end
end
end
end

Expand Down

0 comments on commit 7ead06e

Please sign in to comment.