From dfe8a89f537625445ae639f005448c2ae9ede376 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 20 Apr 2013 11:52:33 +0200 Subject: [PATCH] Reset UserInfo.current_user_id for every test. --- test/test_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index c18dccb18..a2100e697 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -19,6 +19,13 @@ class ActiveSupport::TestCase # load seeds load "#{Rails.root}/db/seeds.rb" + setup do + + # set current user + puts 'reset UserInfo.current_user_id' + UserInfo.current_user_id = nil + end + # Add more helper methods to be used by all tests here... end