A platform for community discussion. Free, open, simple.
DEV: Add pry-byebug and optionally require pry behind a ENV var for better spec debugging (#9984)
Martin Brennane84ffb4861d8
diff --git a/Gemfile b/Gemfileindex da983fa8c70..b708152130b 100644--- a/Gemfile+++ b/Gemfile@@ -112,6 +112,7 @@ gem 'oj'gem 'pg'gem 'mini_sql'gem 'pry-rails', require: false+gem 'pry-byebug', require: falsegem 'r2', require: falsegem 'rake'diff --git a/Gemfile.lock b/Gemfile.lockindex 2c64a4bb47f..0aeb34d0666 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -267,6 +267,9 @@ GEMpry (0.13.1)coderay (~> 1.1)method_source (~> 1.0)+ pry-byebug (3.9.0)+ byebug (~> 11.0)+ pry (~> 0.13.0)pry-rails (0.3.9)pry (>= 0.10.4)public_suffix (4.0.5)@@ -516,6 +519,7 @@ DEPENDENCIESoneboxparallel_testspg+ pry-byebugpry-railspumar2diff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 256de296583..dd4879d7fef 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -8,6 +8,12 @@ endrequire 'rubygems'require 'rbtrace'+if ENV['IMPROVED_SPEC_DEBUGGING']+ require 'pry'+ require 'pry-byebug'+ require 'pry-rails'+end+# Loading more in this block will cause your tests to run faster. However,# if you change any configuration or code from libraries loaded here, you'll# need to restart spork for it take effect.