Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration for Rspec should go to rails_helper.rb not spec_helper.rb ? #270

Closed
januszm opened this issue Jul 19, 2016 · 4 comments
Closed

Comments

@januszm
Copy link

januszm commented Jul 19, 2016

Looks like Rspec doesn't know about PublicActivity when it is called from spec_helper.rb but it seems to work when it's required and called from within rails_helper.rb

  # PublicActivity off
  require 'public_activity/testing'
  PublicActivity.enabled = false
@pokonski
Copy link
Member

pokonski commented Jul 19, 2016

PublicActivity doesn't load itself in test environments (as with every other gem). It's programmer's responsibility to require it, usually this is taken care of by Bundler.

@januszm
Copy link
Author

januszm commented Jul 19, 2016

I think that we're misunderstood. It does load when you use require ... in rails_helper.rb. Your README says to put that code into spec_helper.rb

It seems that you need to update README file.

@pokonski
Copy link
Member

Ah! I understand now, yeah you are correct :)

@spilth
Copy link
Contributor

spilth commented Jul 29, 2017

I submitted a PR for this tiny fix: #303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants