Open linojon opened 11 years ago
bump. Having the same issue here.
bump here as well.
test_helper.rb
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require "rails/test_help"
require "minitest/rails"
require "minitest/rails/capybara"
require 'resque_unit_scheduler'
require 'resque_unit'
require 'action_controller/test_case'
require 'machinist'
require 'machinist/active_record'
require 'mocha/setup'
require 'turn'
require 'vcr'
begin
require 'pry-rescue/minitest'
rescue LoadError => e
end
load_schema_from_file = lambda {
load "#{Rails.root.to_s}/db/schema.rb" # use db agnostic schema by default
}
silence_stream(STDOUT, &load_schema_from_file)
inside of my test_helper.rb sorted out this error for me.
If you are using Machinist, make sure the silence_streams call is before your
Dir["#{File.expand_path(File.dirname(__FILE__))}/blueprints/*.rb"].each { |f| require f }
Ah yes, this would not work. It's because we disconnect/reconnect from the database several times while booting the app in zeus. I'm not too sure how/if-possible to work around this. Simply not disconnecting might actually solve the problem. I guess we could test for whether the AR connection is an in-memory SQLite DB to determine whether to reconnect or not.
same issue here ... :(
+1 same issue
zeus fails all rspecs when setup to use sqlite in memory database. I'm hoping there's a way to configure my spec_helper to handle it but haven't figured out a way. Runs fine without zeus.
database.yml
spec_helper.rb
When i run it acts like no tables exist in the database, e.g
Running rake db:test:prepare either before or after zeus start does not help.