From 9423847cb110d7d5e43c1c4266f7c5562acc6b0c Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sat, 20 Feb 2016 07:46:37 +0100 Subject: [PATCH] Add test_after_commit gem Fixes the indexing of papers when running the tests since they are wrapped in a transaction. see http://www.justinweiss.com/articles/a-couple-callback-gotchas-and-a-rails-5-fix/ --- Gemfile | 1 + Gemfile.lock | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 594c698..56c9d66 100644 --- a/Gemfile +++ b/Gemfile @@ -59,6 +59,7 @@ group :test do gem 'shoulda-matchers', '~> 3.1' gem 'faker' gem 'simplecov', require: false + gem 'test_after_commit' # TODO remove when moving to rails 5 end # Use ActiveModel has_secure_password diff --git a/Gemfile.lock b/Gemfile.lock index be26256..5493a50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -248,6 +248,8 @@ GEM sqlite3 (1.3.10) temple (0.7.5) terminal-notifier-guard (1.6.4) + test_after_commit (0.4.2) + activerecord (>= 3.2) thor (0.19.1) thread_safe (0.3.5) tilt (1.4.1) @@ -299,6 +301,7 @@ DEPENDENCIES spring-commands-rspec sqlite3 terminal-notifier-guard + test_after_commit turbolinks uglifier validate_url