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

Fix respond_to with scopes #1124

Merged
merged 1 commit into from
Feb 13, 2019
Merged

Fix respond_to with scopes #1124

merged 1 commit into from
Feb 13, 2019

Conversation

jdelStrother
Copy link
Contributor

I ran into problems trying to stub out sphinx scopes with rspec:

class Post
  sphinx_scope :public_posts, -> { { with: {public_read: true } }
end

allow(Post).to receive(:public_posts).and_return(double('sphinx-results'))

which raises "Post does not implement: public_posts". WDYT to this fix?

@pat
Copy link
Owner

pat commented Feb 13, 2019

Looks great, thank you :)

@pat pat merged commit 6c3e49a into pat:develop Feb 13, 2019
@pat
Copy link
Owner

pat commented Mar 9, 2019

Just published v4.2.0 which includes this PR :)

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