Skip to content

Commit

Permalink
trying to fix issues with travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonborg committed May 8, 2017
1 parent 163428b commit 2a1ef46
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require './config/environment'

if ActiveRecord::Migrator.needs_migration? && !test?
if ActiveRecord::Migrator.needs_migration?
raise 'Migrations are pending. Run `rake db:migrate` to resolve the issue.'
end

Expand Down
6 changes: 0 additions & 6 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@

if production?
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
elsif test?
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: ':memory:',
timeout: 500
)
else
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
Expand Down
Binary file modified db/test.sqlite
Binary file not shown.
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
require 'capybara/rspec'
require 'capybara/dsl'

if ActiveRecord::Migrator.needs_migration?
raise 'Migrations are pending. Run to resolve the issue.'
end

ActiveRecord::Base.logger = nil

RSpec.configure do |config|
Expand Down

0 comments on commit 2a1ef46

Please sign in to comment.