add env vars support in config

This commit is contained in:
Cole A 2017-01-04 16:37:33 -05:00
parent 92b58aa680
commit c8a1989c11
2 changed files with 14 additions and 6 deletions

View File

@ -21,9 +21,9 @@ stats_development: &stats
adapter: mysql2 adapter: mysql2
encoding: utf8 encoding: utf8
pool: 5 pool: 5
username: ivauser username: <%= ENV['STATS_DB_USER'] %>
password: <%= ENV['DB_PASS'] %> password: <%= ENV['STATS_DB_PASS'] %>
host: taylors.c02zesysnssi.us-west-2.rds.amazonaws.com host: <%= ENV['STATS_DB_URL'] %>
port: 3306 port: 3306
database: main database: main

View File

@ -1,9 +1,17 @@
require 'test_helper' require 'test_helper'
class OysterTest < ActiveSupport::TestCase class OysterTest < ActiveSupport::TestCase
test "the_truth" do
f = Oyster.first test "check_connection" do
puts f.inspect Oyster.connection
assert true assert true
end end
test "get_first_oyster" do
first = Oyster.first
id = first.oyster_id == 1
run = first.run_id == 257
grade = first.grade == "Rej"
assert id && run && grade
end
end end