Skip to content

Commit 3562213

Browse files
fbacallCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0795907 commit 3562213

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

test/controllers/search_controller_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ def with(field, value = nil)
6868
def method_missing(*args); self; end
6969
end
7070

71-
search = dummy_search.new
72-
Sunspot.stub(:search, -> (_, &block) { search.instance_eval(&block) }) do
73-
# When not in a space, with spaces disabled, space constraint should be unset (show everything)
71+
Sunspot.stub(:search, ->(_, &block) { search.instance_eval(&block); MockSearch.new([]) }) do
7472
with_settings(solr_enabled: true, feature: { spaces: false }) do
7573
get :index, params: { q: 'banana' }
7674
assert_response :success

0 commit comments

Comments
 (0)