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

Don't require active_record and action_controller #101

Closed
bdimcheff opened this issue Jun 26, 2010 · 3 comments
Closed

Don't require active_record and action_controller #101

bdimcheff opened this issue Jun 26, 2010 · 3 comments

Comments

@bdimcheff
Copy link

My rails app doesn't use activerecord at all, so I disabled it in my environment. I noticed that rspec/rails requires active_record (and action_controller) in rspec/rails/matchers.rb anyways, even if they're disabled. I pulled those requires out and moved them into spec_helper since they're needed for the rspec specs to run. It looks like you're just ignoring the LoadErrors anyways if they aren't in the load path, so it doesn't seem to me that removing them should be a problem. The specs pass and it works fine in my app.

bdimcheff/rspec-rails@49293d5

  • Brandon
@markiz
Copy link

markiz commented Jun 26, 2010

My random guess is that AR and AC should be required before rspec/rails if they're used.

@bdimcheff
Copy link
Author

Yeah in my spec_helper, the Rails environment is loaded before rspec/rails, and I have to imagine it's that way for everybody else, too. I'm not sure why rspec would ever need to require activerecord or actioncontroller.

@dchelimsky
Copy link
Contributor

Don't require the things that are already required by Rails.

Closed by 471d6d8.

jamesottaway pushed a commit to jamesottaway/rspec-rails that referenced this issue Mar 30, 2015
This issue was closed.
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