Sha256: 7d20a67200e54f49c6849292ce53358800498c58be8dccd72a94149df988394b
Contents?: true
Size: 638 Bytes
Versions: 5
Compression:
Stored size: 638 Bytes
Contents
require "spec_helper" describe ScopedSearch::AutoCompleteBuilder do before(:each) do @definition = mock('ScopedSearch::Definition') @definition.stub!(:klass).and_return(Class.new(ActiveRecord::Base)) @definition.stub!(:profile).and_return(:default) @definition.stub!(:profile=).and_return(true) end it "should return empty suggestions if the search query is nil" do ScopedSearch::AutoCompleteBuilder.auto_complete(@definition, nil).should == [] end it "should return empty suggestions if the query is blank" do ScopedSearch::AutoCompleteBuilder.auto_complete(@definition, "").should == [] end end
Version data entries
5 entries across 5 versions & 1 rubygems