Forum: Ruby on Rails Rspec issue loading files twice

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D4939a7057bb36ba26290a81ae137ae6?d=identicon&s=25 Akhil S. (akhil1101)
on 2016-09-05 07:52
I am trying to add rspec to my existing project. My rails version is
4.2.1, ruby is 2.3.1. and rspec is 3.0.4. Now I have an issue when
running the rspec that is all routes and files under config/initailzer
are executed twice which produces an error(Already initialized route). I
am using a gem 'mailboxer' in the poject. I think the issue happens when
the lib/mailboxer/engine.rb is executed The content of the file is exact
same as in
The issue goes, when I delete the file and test works fine. Can anyone
suggest a solution for this problem. Thanks in advance
This topic is locked and can not be replied to.