I am integrating public_activity (version 1.5) gem to my Rails 4 app.
Trying to set up tests as specified in their wiki, I write the following:
#spec_helper.rb
require 'public_activity/testing'
PublicActivity.enabled = false
However, trying to run my specs I get the following error:
/my_app/spec/spec_helper.rb:24:in
<top (required)>': undefined method
enabled=' for PublicActivity:Module (NoMethodError)
Looking at Public Activity module source code I can clearly see enable=
method there.
Can you please advise me what am I doing wrong here?
Looking at the source,
testing.rb
does not requirePublicActivity
whereenabled=
is defined, so I believe you'll need to dolike it's done in their
test_helper.rb
.