Guest User

Untitled

a guest
Nov 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
  2. index ecbe44f1c..593fb8fcc 100644
  3. --- a/spec/spec_helper.rb
  4. +++ b/spec/spec_helper.rb
  5. @@ -49,6 +49,17 @@ RSpec.configure do |config|
  6. # config.disable_monkey_patching!
  7. # spec_helper NOTE: enabling this disables concise RSpec syntax
  8. config.include FactoryGirl::Syntax::Methods
  9. + config.around :each do |ex|
  10. + old = $stderr
  11. + $stderr = fake = StringIO.new
  12. + ex_file = ex.metadata[:block].source_location[0].gsub '/Users/ericboehs/Code/spreemo/chewy/', ''
  13. + ex_line_no = ex.metadata[:block].source_location[1]
  14. + ex.run
  15. + $stderr = old
  16. + if fake.string.present?
  17. + File.open('deprecations.txt', 'a') {|f| f.write("#{ex_file} #{ex_line_no} #{fake.string}") }
  18. + end
  19. + end
  20.  
  21. if ENV['CI']
  22. # show retry status in spec process
Add Comment
Please, Sign In to add comment