Check to see that the necessary modules are actually loaded before extending #467

merged 2 commits into from Dec 1, 2011


None yet

2 participants

jasonmk commented Dec 1, 2011

In our setup, there are times when we load pieces of ActiveRecord but not the entire thing. For example, we have a plugin that does all its work over ActiveResource but still pulls in ActiveRecord's DynamicFinderMatch class to avoid having to reimplement the functionality. However, if our app isn't using ActiveRecord, then RSpec fails to load. The attached changes solve the problem by checking for the needed parts of ActiveRecord instead of if the top-level constant exists.

jasonmk added some commits Dec 1, 2011
@dchelimsky dchelimsky merged commit ffdac58 into rspec:master Dec 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment