Sha256: 3688478b913eaa5d075af1410a67831859029cbc404bd3d9a017a6b5dc1e92ed

Contents?: true

Size: 592 Bytes

Versions: 6

Compression:

Stored size: 592 Bytes

Contents

module DeepTest
  class RindaBlackboard
    def initialize(tuple_space = TupleSpaceFactory.tuple_space)
      @tuple_space = tuple_space
    end
    
    def take_result
      result = @tuple_space.take ["test_result", nil], 30
      result[1]
    end

    def take_test
      tuple = @tuple_space.take ["run_test", nil, nil], 30
      eval(tuple[1]).new(tuple[2])
    end

    def write_result(result)
      @tuple_space.write ["test_result", result]
    end

    def write_test(test_case)
      @tuple_space.write ["run_test", test_case.class.to_s, test_case.method_name]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
deep_test-1.0.2 lib/deep_test/rinda_blackboard.rb
deep_test-1.0.3 lib/deep_test/rinda_blackboard.rb
deep_test-1.0.4 lib/deep_test/rinda_blackboard.rb
deep_test-1.1.0 lib/deep_test/rinda_blackboard.rb
deep_test-1.1.1 lib/deep_test/rinda_blackboard.rb
deep_test-1.1.2 lib/deep_test/rinda_blackboard.rb