Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Caution is a virtue
set -o nounset
set -o errtrace
set -o errexit
set -o pipefail
curl_opts=${CURL_OPTS:-""}
module Workflow
class Specification
attr_accessor :before_transition_proc
private
def before_transition(&proc)
@before_transition_proc = proc
end
end
module WorkflowInstanceMethods
def process_event!(name, *args)
require File.join(File.dirname(__FILE__), 'test_helper')
require 'workflow'
class BeforeTransitionTest < Test::Unit::TestCase
class MyFlow
attr_reader :history
def initialize
@history = []
end