diff options
Diffstat (limited to 'activerecord/test/connections/native_sqlite')
-rw-r--r-- | activerecord/test/connections/native_sqlite/connection.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/connections/native_sqlite/connection.rb b/activerecord/test/connections/native_sqlite/connection.rb index db688bdb70..e702006bc2 100644 --- a/activerecord/test/connections/native_sqlite/connection.rb +++ b/activerecord/test/connections/native_sqlite/connection.rb @@ -3,6 +3,9 @@ require 'fixtures/course' require 'logger' ActiveRecord::Base.logger = Logger.new("debug.log") +class SqliteError < StandardError +end + BASE_DIR = File.expand_path(File.dirname(__FILE__) + '/../../fixtures') sqlite_test_db = "#{BASE_DIR}/fixture_database.sqlite" sqlite_test_db2 = "#{BASE_DIR}/fixture_database_2.sqlite" @@ -12,7 +15,7 @@ def make_connection(clazz, db_file, db_definitions_file) puts "SQLite database not found at #{db_file}. Rebuilding it." sqlite_command = "sqlite #{db_file} 'create table a (a integer); drop table a;'" puts "Executing '#{sqlite_command}'" - `#{sqlite_command}` + raise SqliteError.new("Seems that there is no sqlite executable available") unless system(sqlite_command) clazz.establish_connection( :adapter => "sqlite", :dbfile => db_file) |