Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahemoff/47397744979319421c46 to your computer and use it in GitHub Desktop.
Save mahemoff/47397744979319421c46 to your computer and use it in GitHub Desktop.
Rails TestCase - Log current test case info plus couple of other tricks (handy if watching test and useful to see where console messages are being output from)
class ActiveSupport::TestCase
ActiveRecord::Migration.check_pending!
fixtures :all
def setup
puts "------ #{self.class}:#{method_name} ------"
Rails.cache.clear
self.do_setup
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment