Sha256: fa36f17f966ad6cc3bcad1a727387edf4fb8a296f335f102cf3634e715b322a8

Contents?: true

Size: 649 Bytes

Versions: 5

Compression:

Stored size: 649 Bytes

Contents

require_relative '../test-util'

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pione-0.1.4 test/model/spec_call-rule.rb
pione-0.1.3 test/model/spec_call-rule.rb
pione-0.1.2 test/model/spec_call-rule.rb
pione-0.1.1 test/model/spec_call-rule.rb
pione-0.1.0 test/model/spec_call-rule.rb