Skip to content
Browse files

Add test sqlite3 db to .gitignore

  • Loading branch information...
1 parent 5b1a1bf commit e945bcfe4a519e6cf7349443c48fecce2e8c9d67 @lifo lifo committed Mar 20, 2009
View
1 .gitignore
@@ -8,6 +8,7 @@ activesupport/doc
activeresource/pkg
activerecord/pkg
actionpack/pkg
+activemodel/test/fixtures/fixture_database.sqlite3
actionmailer/pkg
activesupport/pkg
railties/pkg
View
5 activemodel/test/cases/helper.rb
@@ -9,17 +9,14 @@
require 'logger'
ActiveRecord::Base.logger = Logger.new("debug.log")
-class SqliteError < StandardError
-end
-
# Setup database connection
db_file = "#{FIXTURES_ROOT}/fixture_database.sqlite3"
ActiveRecord::Base.configurations = { ActiveRecord::Base.name => { :adapter => 'sqlite3', :database => db_file, :timeout => 5000 } }
unless File.exist?(db_file)
puts "SQLite3 database not found at #{db_file}. Rebuilding it."
sqlite_command = %Q{sqlite3 "#{db_file}" "create table a (a integer); drop table a;"}
puts "Executing '#{sqlite_command}'"
- raise SqliteError.new("Seems that there is no sqlite3 executable available") unless system(sqlite_command)
+ raise StandardError.new("Seems that there is no sqlite3 executable available") unless system(sqlite_command)
end
ActiveRecord::Base.establish_connection(ActiveRecord::Base.name)
View
BIN activemodel/test/fixtures/fixture_database.sqlite3
Binary file not shown.

0 comments on commit e945bcf

Please sign in to comment.
Something went wrong with that request. Please try again.