Sha256: 4a9a61c639992c31cee690bf84ebab2b9ee9083dac44ecf66a8f104bc6e27128

Contents?: true

Size: 513 Bytes

Versions: 2

Compression:

Stored size: 513 Bytes

Contents

require_relative 'spec_helper'

module CompilerHelpers
  include Alf::Lang::Functional

  def suppliers
    Alf::Algebra.named_operand(:suppliers, sap)
  end

  def supplies
    Alf::Algebra.named_operand(:supplies, sap)
  end

  def parts
    Alf::Algebra.named_operand(:parts, sap)
  end

  def _context
    sap
  end

  def an_operand
    Alf::Algebra::Operand::Fake.new(sap)
  end

  def compile(expr)
    Alf::Sequel::Compiler.new.call(expr)
  end

end

RSpec.configure do |c|
  c.include CompilerHelpers
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-sequel-0.14.0 spec/compiler_helper.rb
alf-sequel-0.13.0 spec/compiler_helper.rb