Sha256: 72034e4c702112d0ccb3f844927ccdd6791dce16b262ff3a9d2a8c3f23936892
Contents?: true
Size: 730 Bytes
Versions: 1
Compression:
Stored size: 730 Bytes
Contents
require 'spec_helper' require 'conceptql' describe ConceptQL::Query do describe '#query' do it 'passes request on to tree' do yaml = Psych.dump({ icd9: '799.22' }) mock_tree = double("tree") mock_operator = double("operator") mock_query = double("query") mock_db = double("db") expect(mock_db).to receive(:extend_datasets).with(Module).and_return(mock_db) query = ConceptQL::Query.new(mock_db, yaml, mock_tree) expect(mock_tree).to receive(:root).with(query).and_return(mock_operator) expect(mock_operator).to receive(:evaluate).with(mock_db).and_return(mock_query) expect(mock_query).to receive(:tap).and_return(mock_query) query.query end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
conceptql-0.2.0 | spec/conceptql/query_spec.rb |