Sha256: 38f70b33fa5bff80d18c4b7288c9eceb50dbc511383a29124718adfc1f2b5659
Contents?: true
Size: 697 Bytes
Versions: 1
Compression:
Stored size: 697 Bytes
Contents
require "#{File.dirname(__FILE__)}/../spec_helper" describe ScopedSearch::QueryBuilder do before(:each) do @definition = mock('ScopedSearch::Definition') @definition.stub!(:klass).and_return(Class.new(ActiveRecord::Base)) end it "should return empty conditions if the search query is nil" do ScopedSearch::QueryBuilder.build_query(@definition, nil).should == { } end it "should return empty conditions if the query is blank" do ScopedSearch::QueryBuilder.build_query(@definition, "").should == { } end it "should return empty conditions if the query is whitespace only" do ScopedSearch::QueryBuilder.build_query(@definition, "\t ").should == { } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scoped_search-2.0.1 | spec/unit/query_builder_spec.rb |