Sha256: a212a910294307349c723bb6ae4685a626c9847204bcebd2a93384339141d6fa
Contents?: true
Size: 489 Bytes
Versions: 2
Compression:
Stored size: 489 Bytes
Contents
describe 'loadable configuration file' do before do File.open('databases.yml', 'w') do |f| f.puts 'default:' f.puts ' test:' f.puts ' adapter: sqlite3' f.puts ' database: <%= ENV["DB_NAME"] %>' end end it 'should use environment variables in config' do ENV['DB_NAME'] = 'test_database' SqlMigrations::Config.load! 'databases.yml' expect(SqlMigrations::Config.options['default']['test']['database']).to eq 'test_database' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sql_migrations-2.1.0.pre2 | spec/features/config_spec.rb |
sql_migrations-2.1.0.pre1 | spec/features/config_spec.rb |