Sha256: b02dce27d95dcd1c6057555ec0a85a66bf306e1c7f8f613c1f4988ff5e8e788f

Contents?: true

Size: 673 Bytes

Versions: 3

Compression:

Stored size: 673 Bytes

Contents

require_relative '../test-util'

describe 'Model::CallRule' do
  it 'should be equal' do
    CallRule.new(RuleExpr.new(PackageExpr.new("main"), "a")).should ==
      CallRule.new(RuleExpr.new(PackageExpr.new("main"), "a"))
  end

  it 'should be not equal' do
    CallRule.new(RuleExpr.new(PackageExpr.new("main"), "a")).should.not ==
      CallRule.new(RuleExpr.new(PackageExpr.new("main"), "b"))
  end

  it 'should eval' do
    a = CallRule.new(Variable.new("a"))
    a.eval(VariableTable.new(
        Variable.new("a") =>
        RuleExpr.new(PackageExpr.new("main"), "b")
    )).should == CallRule.new(
      RuleExpr.new(PackageExpr.new("main"), "b")
    )
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pione-0.2.2 test/model/spec_call-rule.rb
pione-0.2.1 test/model/spec_call-rule.rb
pione-0.2.0 test/model/spec_call-rule.rb