lib/appstats/test_query.rb in appstats-0.19.2 vs lib/appstats/test_query.rb in appstats-0.19.6
- old
+ new
@@ -27,12 +27,11 @@
def process_query
query.query_to_sql = "this is not valid sql"
end
def db_connection
- dbconfig = YAML::load(File.open('db/config.yml'))
- ActiveRecord::Base.establish_connection(dbconfig['development']).connection
+ ActiveRecord::Base.connection
end
end
class BadGroupTestQuery
@@ -43,11 +42,10 @@
query.query_to_sql = "select count(*) as num from appstats_test_objects"
query.group_query_to_sql = "this is not valid sql"
end
def db_connection
- dbconfig = YAML::load(File.open('db/config.yml'))
- ActiveRecord::Base.establish_connection(dbconfig['development']).connection
+ ActiveRecord::Base.connection
end
end
\ No newline at end of file