Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: vanstee/sunspot
...
head fork: vanstee/sunspot
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
View
6 sunspot_rails/lib/sunspot/rails/stub_session_proxy.rb
@@ -55,7 +55,11 @@ def search(*types)
def new_search(*types)
Search.new
end
-
+
+ def more_like_this(*args)
+ Search.new
+ end
+
def new_more_like_this(*args)
Search.new
end
View
10 sunspot_rails/spec/stub_session_proxy_spec.rb
@@ -79,11 +79,6 @@
Post.search
end
- it 'should not execute a search when #search called' do
- @session.should_not_receive(:search)
- Post.search
- end
-
it 'should not execute a search when #search called with parameters' do
@session.should_not_receive(:search)
Post.search(:include => :blog, :select => 'id, title')
@@ -94,6 +89,11 @@
Sunspot.new_search(Post).should respond_to(:execute)
end
+ it 'should not send more_like_this to session' do
+ @session.should_not_receive(:more_like_this)
+ Sunspot.more_like_this(@post)
+ end
+
describe 'stub search' do
before :each do
@search = Post.search

No commit comments for this range

Something went wrong with that request. Please try again.