README.md in isolator-1.0.1 vs README.md in isolator-1.1.0

- old
+ new

@@ -73,16 +73,21 @@ However, there are some potential caveats: 1) Isolator tries to detect the environment automatically and includes only necessary adapters. Thus the order of loading gems matters: make sure that `isolator` is required in the end (NOTE: in Rails, all adapters loaded after application initialization). -2) Isolator does not distinguish framework-level adapters. For example, `:active_job` spy doesn't take into account which AJ adapter you use; if you are using a safe one (e.g. `Que`) just disable the `:active_job` adapter to avoid false negatives (i.e. `Isolator.adapters.active_job.disable!`). +2) Isolator does not distinguish framework-level adapters. For example, `:active_job` spy doesn't take into account which AJ adapter you use; if you are using a safe one (e.g. `Que`) just disable the `:active_job` adapter to avoid false negatives. You can do this by adding an initializer: -3) Isolator tries to detect the `test` environment and slightly change its behavior: first, it respect _transactional tests_; secondly, error raising is turned on by default (see [below](#configuration)). + ```rb + require "active_job/base" + Isolator.adapters.active_job.disable! + ``` -4) Experimental [multiple databases](https://guides.rubyonrails.org/active_record_multiple_databases.html) has been added in v0.7.0. Please, let us know if you encounter any issues. +4) Isolator tries to detect the `test` environment and slightly change its behavior: first, it respect _transactional tests_; secondly, error raising is turned on by default (see [below](#configuration)). +5) Experimental [multiple databases](https://guides.rubyonrails.org/active_record_multiple_databases.html) has been added in v0.7.0. Please, let us know if you encounter any issues. + ### Configuration ```ruby Isolator.configure do |config| # Specify a custom logger to log offenses @@ -158,10 +163,11 @@ - `:resque` - `:resque_scheduler` - `:sucker_punch` - `:mailer` - `:webmock` – track mocked HTTP requests (unseen by Sniffer) in tests +- `:action_cable` You can dynamically enable/disable adapters, e.g.: ```ruby # Disable HTTP adapter == do not spy on HTTP requests @@ -169,9 +175,11 @@ # Enable back Isolator.adapters.http.enable! ``` + +For `active_job`, be sure to first `require "active_job/base"`. ### Fix Offenses For the actions that should be executed only after successful transaction commit (which is mostly always so), you can try to use the `after_commit` callback from [after_commit_everywhere] gem (or use native AR callback in models if it's applicable).