I\'m trying to write a request test that asserts that the proper links appear on the application layout depending in whether a user is logged in or out. FWIW, I\'m using Dev
Halfnelson's solution worked for me too, but since I'm using the Fabrication gem instead of FactoryGirl, I needed to make some adjustments. Here's the code I droped into a initializer:
if Rails.env.development? || Rails.env.test?
ActionDispatch::Callbacks.after do
Fabrication.clear_definitions
Rails.logger.debug 'Reloading fabricators'
end
end