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
encoding: utf8
pool: 5
username: ivauser
password: <%= ENV['DB_PASS'] %>
host: taylors.c02zesysnssi.us-west-2.rds.amazonaws.com
username: <%= ENV['STATS_DB_USER'] %>
password: <%= ENV['STATS_DB_PASS'] %>
host: <%= ENV['STATS_DB_URL'] %>
port: 3306
database: main

View File

@ -1,9 +1,17 @@
require 'test_helper'
class OysterTest < ActiveSupport::TestCase
test "the_truth" do
f = Oyster.first
puts f.inspect
test "check_connection" do
Oyster.connection
assert true
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