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

Get specs running under Rails 4.1.0.beta1 #101

Merged
merged 2 commits into from
Feb 22, 2014
Merged

Get specs running under Rails 4.1.0.beta1 #101

merged 2 commits into from
Feb 22, 2014

Conversation

petergoldstein
Copy link
Contributor

  1. Switched to MiniTest for Rails 4.1 compatibility.
  2. Add explicit unscoped when checking results in test, so we don't get clobbered by the existing default_scope on the lookup.

The default_scope behavior appears to have changed in Rails 4.1. Previously the addition of a 'where(active: false)' would override the existing 'where(active: true)' from the default_scope. That no longer occurs in Rails 4.1. Instead one must explicitly unscope the default_scope to get the same behavior as in earlier Rails version.

The change I made to address this issue only affects the lookup of matching records in the test, and not the code in the library itself. I believe it preserves the original intent of the specs.

… when checking results in test, so we don't get clobbered by the existing default_scope on the lookup.
swanandp added a commit that referenced this pull request Feb 22, 2014
Get specs running under Rails 4.1.0.beta1
@swanandp swanandp merged commit c26cef9 into brendon:master Feb 22, 2014
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

Successfully merging this pull request may close these issues.

2 participants