Sha256: 9d187add6a8377b95a4301f358068f557cf1933bc0991c70b8191cb168365b70

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

#
# testing ruote
#
# Thu Jul  9 13:31:59 JST 2009
#

require File.expand_path('../base', __FILE__)


class EftEqualsTest < Test::Unit::TestCase
  include FunctionalBase

  def test_false

    pdef = Ruote.process_definition :name => 'test' do
      sequence do

        equals :field_value => 'missing', :other_value => 'nada'
        echo '${f:__result__}'
        equals :variable_value => 'missing', :other_value => 'nada'
        echo '${f:__result__}'

        equals :value => 'missing', :other_value => 'nada'
        echo '${f:__result__}'
        equals :val => 'missing', :other_val => 'nada'
        echo '${f:__result__}'
      end
    end

    #noisy

    assert_trace(%w[ false ] * 4, pdef)
  end

  def test_true

    pdef = Ruote.process_definition :name => 'test' do
      sequence do

        equals :value => 'nada', :other_value => 'nada'
        echo '${f:__result__}'

        set 'v:nada' => 'nada'
        equals :variable_value => 'nada', :other_value => 'nada'
        echo '${f:__result__}'
      end
    end

    #noisy

    assert_trace(%w[ true ] * 2, pdef)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruote-2.3.0.3 test/functional/eft_17_equals.rb
ruote-2.3.0.2 test/functional/eft_17_equals.rb
ruote-2.3.0.1 test/functional/eft_17_equals.rb
ruote-2.3.0 test/functional/eft_17_equals.rb