Sha256: c8fdf6777e494f2cb2d147193419430911a078882d383128a518433c77749f28

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Tue Jan  2 13:14:37 JST 2007
#

require 'flowtestbase'
require 'openwfe/expool/history'
require 'openwfe/expressions/raw_prog'

include OpenWFE


class FlowTest22 < FlowTestBase

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    class TestDefinition0 < ProcessDefinition
        def make
            process_definition :name => "test0", :revision => "0" do
                sequence do
                    _print "a"
                    _print "b"
                    _print "c"
                end
            end
        end
    end

    def test_history_0

        @engine.init_service("history", InMemoryHistory)

        history = @engine.application_context["history"]

        dotest(
            TestDefinition0,
            """a
b
c""")

        #puts history.to_s
        #puts history.entries.size()

        #f = File.open("history.log", "w")
        #f.write(history.to_s)
        #f.close()

        assert \
            (history.entries.size == 34 or history.entries.size == 37),
            "History count is #{history.entries.size} should be 34 (or 37)"

        # 37 in case of persisted engine (it's slower, so rescheduling kicks in)
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openwferu-0.9.4 test/ft_22_history.rb