require 'test/unit'

module Borges;end
require 'Borges/Callback/Callback'
require 'Borges/Callback/ActionCallback'
require 'Borges/Callback/CallbackStore'

class ActionCallbackTest < Test::Unit::TestCase

  def setup
    @store = Borges::CallbackStore.new
    @callback = Borges::ActionCallback.new do
      "called"
    end
  end

  def test_action_callback?
    assert @callback.action_callback?, "Is an action callback"
  end

  def test_evaluate
    assert_equal "called", @callback.evaluate(nil, @store).call
  end

end # class ActionCallbackTest

