Sha256: e8d94a98eaad527ff087151c3efab1a9725a104f3b8a169cfa6f0e077fb8985b
Contents?: true
Size: 1000 Bytes
Versions: 17
Compression:
Stored size: 1000 Bytes
Contents
module CloudSesame module Query module AST describe StringValue do describe '.parse' do let(:value) { "value" } it 'should instantiate a StringValue' do expect(StringValue).to receive(:new).with(value) StringValue.parse(value) end it 'should return the StringValue' do expect(StringValue.parse(value)).to be_kind_of(StringValue) end end describe '.compile' do subject { StringValue.new(value) } context 'when value is not present' do let(:value) { nil } it 'should return nothing' do expect(subject.compile).to eq nil end end context 'when value is present' do let(:value) { "value" } it 'should return the escaped the value' do expect(subject.compile).to eq "'#{ value }'" end end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems