Sha256: b5bfea10f07f424e1574807b6da5e56345b5a41c3ac84844882883c3dffe8357
Contents?: true
Size: 721 Bytes
Versions: 11
Compression:
Stored size: 721 Bytes
Contents
require 'minitest_helper' describe 'NQL::ComputedAttributes' do let(:parser) { Rasti::DB::NQL::SyntaxParser.new } def parse(expression) parser.parse expression end it 'must have one computed attributes' do tree = parse 'notice = any notice' tree.computed_attributes(Posts).must_equal [:notice] end it 'must have multiple computed attributes' do tree = parse 'notice = any notice & (author: anonym | title = good morning)' tree.computed_attributes(Posts).must_equal [:notice, :author] end it 'must have not repeated computed attributes when expression have it' do tree = parse 'notice = Hi | notice = Bye' tree.computed_attributes(Posts).must_equal [:notice] end end
Version data entries
11 entries across 11 versions & 1 rubygems