Sha256: 05cbace294fe4282a59c97239e97de627e0d8c8d79579290f38601cbb711276a
Contents?: true
Size: 738 Bytes
Versions: 66
Compression:
Stored size: 738 Bytes
Contents
require 'spec_helper' module CloudSesame module Query module Node describe QueryOptionsField do let(:query_options_field) { QueryOptionsField.new("description", weight) } describe '#compile' do context 'when weight is nil' do let(:weight) { nil } it 'should return a string with the field' do expect(query_options_field.compile).to eq("description") end end context 'when weight is not nil' do let(:weight) { 2 } it 'should return a string with the weight' do expect(query_options_field.compile).to eq("description^2") end end end end end end end
Version data entries
66 entries across 66 versions & 1 rubygems