basecamp / marginalia

Attach comments to ActiveRecord's SQL queries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to disable in test env?

guillaumebriday opened this issue · comments

I would like to disable this gem in test env. Is it possible?

Thanks!

commented

you can group the gem like in gemfile

group :development, :production do
  gem 'yahoo-weather'
end

You could configure marginalia to have no components in your test environment. With no components, marginalia will not modify sql statements.

For example:

# config/environments/test.rb

# ...

Marginalia::Comment.components = []

or similar in your test or rspec helper, etc.

Or you could exclude it from your Gemfile using groups as above.