Sha256: e85c03bf6fd307b000de7a7971db14f11839650a16f222c285c589090a4a3773

Contents?: true

Size: 706 Bytes

Versions: 22

Compression:

Stored size: 706 Bytes

Contents

require 'spec_helper'

module CloudSesame
  module Query
    module AST
      describe Operator do
        let(:context) {{}}
        let(:options) {{}}
        let(:block) { Proc.new {} }
        subject { Operator.new(context, options, &block) }

        describe '#boost' do
          context 'given boost option' do
            let(:options) {{ boost: 2 }}
            it 'should return an compiled boost value' do
              expect(subject.boost).to eq " boost=2"
            end
          end
          context 'given no boost option' do
            it 'should return nothing' do
              expect(subject.boost).to eq nil
            end
          end
        end

      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
CloudSesame-0.6.8 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.7 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.6 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.5 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.4 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.3 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.2 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.1 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.6.0 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.5 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.4 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.3 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.2 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.1 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.5.0 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.4.6 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.4.5 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.4.4 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.4.3 spec/cloud_sesame/query/ast/operator_spec.rb
CloudSesame-0.4.2 spec/cloud_sesame/query/ast/operator_spec.rb