Closed dcangulo closed 5 years ago
This is a really bad solution to the problem, because what you are doing is adding FlagShihTzu's methods to every object in Ruby, and thereby probably breaking all sorts of unexpected things.
It seems that this must be happening because the gem isn't loading in your test environment by default.
This would be incorrect behavior, as it should be loading FlagShihTzu by default in all environments.
spec/rails_helper.rb
Gemfile
by not adding require: false
:
gem 'flag_shih_tzu`
@pboling As per your suggestion, I decided to remove config.include FlagShihTzu
from my spec/rails_helper.rb file.
I don't know what happened but it works now without it and I didn't change anything.
Thanks.
I am using RSpec to test my app and when I used the gem, the tests starts failing. It tells me that the methods generated by this gem are undefined.
To make it work, I added the following lines in my spec/rails_helper.rb file:
I would be glad to open a PR for this if you're interested.