diff --git a/lib/silent_postgres.rb b/lib/silent-postgres.rb similarity index 68% rename from lib/silent_postgres.rb rename to lib/silent-postgres.rb index f7113af..18b7722 100644 --- a/lib/silent_postgres.rb +++ b/lib/silent-postgres.rb @@ -17,3 +17,9 @@ module SilentPostgres METHOD end end + +if %w(test development).include?(ENV["RAILS_ENV"]) + puts "Silencing Postgres" + require 'silent_postgres' + ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, SilentPostgres) +end