Sha256: 4d85e7c31533ccd96e9743f886d8d71d34c2d8b258f2c43f8c9fdfd20b818269

Contents?: true

Size: 626 Bytes

Versions: 8

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'
require 'dentaku/expression'

describe Dentaku::Expression do
  describe 'an all literal expression' do
    it 'is fully bound' do
      static = described_class.new('1 + 1')
      expect(static).not_to be_unbound
    end
  end

  describe 'an expression with variable identifiers' do
    it 'is unbound' do
      dynamic = described_class.new('a > 5')
      expect(dynamic).to be_unbound
    end

    describe 'with values set for all variables' do
      it 'is fully bound' do
        dynamic = described_class.new('a > 5', {a: 7})
        expect(dynamic).not_to be_unbound
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dentaku-1.2.6 spec/expression_spec.rb
dentaku-1.2.5 spec/expression_spec.rb
dentaku-1.2.4 spec/expression_spec.rb
dentaku-1.2.3 spec/expression_spec.rb
dentaku-1.2.2 spec/expression_spec.rb
dentaku-1.2.1 spec/expression_spec.rb
dentaku-1.2.0 spec/expression_spec.rb
dentaku-1.1.0 spec/expression_spec.rb