spec/unit/migrator_spec.rb in apartment-0.20.0 vs spec/unit/migrator_spec.rb in apartment-0.21.0
- old
+ new
@@ -8,9 +8,11 @@
before do
ActiveRecord::Base.establish_connection config
Apartment::Database.stub(:config).and_return config # Use postgresql config for this test
@original_schema = ActiveRecord::Base.connection.schema_search_path
+ # Necessary because the JDBC adapter returns $user in the search path
+ @original_schema.gsub!(/"\$user",/, '') if defined?(JRUBY_VERSION)
Apartment.configure do |config|
config.use_schemas = true
config.excluded_models = []
config.database_names = [schema_name]
\ No newline at end of file