Skip to content

Commit

Permalink
Use an in-memory sqlite database for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 21, 2009
1 parent 2eddc99 commit dc4b467
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spec/money/rails/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
require 'active_record'
require 'money/rails'

ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => File.expand_path(File.dirname(__FILE__) + '/test.db' ))
ActiveRecord::Schema.suppress_messages do
ActiveRecord::Schema.define do
create_table :money_examples, :force => true do |t|
t.integer :credit_amount_in_cents
t.integer :debit_amount_in_cents
end
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
create_table :money_examples, :force => true do |t|
t.integer :credit_amount_in_cents
t.integer :debit_amount_in_cents
end
end

Expand Down

0 comments on commit dc4b467

Please sign in to comment.