Forum: Ruby on Rails Rspec issue loading files twice

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
739af2d8fdc081071d9a18c839d90a34?d=identicon&s=25 Akhil Sudhakaran (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
https://github.com/mailboxer/mailboxer/blob/master....
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.