aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/fake_app.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/fake_app.rb b/spec/fake_app.rb
index 7e9df7c..29c18dc 100644
--- a/spec/fake_app.rb
+++ b/spec/fake_app.rb
@@ -11,8 +11,11 @@ require 'devise'
require 'devise/orm/active_record'
# database
-ActiveRecord::Base.configurations = {'test' => {:adapter => 'postgresql', :database => 'inboxes_test', :username => "postgres"}}
-# ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
+if ENV['TRAVIS'].present?
+ ActiveRecord::Base.configurations = {'test' => {:adapter => 'postgresql', :database => 'inboxes_test', :username => "postgres"}}
+else
+ ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
+end
ActiveRecord::Base.establish_connection('test')
# config