Sha256: bd3c7f7283f92e4e82ad8585aaab673c679c93b04081b3586ce95fa5d9c50c96

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

require File.dirname(__FILE__) + "/test_helper"

unit_tests do
  test "a test that is put on can be taken off later" do
    blackboard = DeepTest::SimpleTestBlackboard.new
    test_case = TestFactory.passing_test
    blackboard.write_test test_case
    assert_equal test_case, blackboard.take_test
  end

  test "taking a test when all have been taken returns nil" do
    blackboard = DeepTest::SimpleTestBlackboard.new
    test_case = TestFactory.passing_test
    blackboard.write_test test_case
    blackboard.take_test
    assert_nil blackboard.take_test
  end

  test "a result that is put on can be taken off later" do
    blackboard = DeepTest::SimpleTestBlackboard.new
    result = TestFactory.passed_result
    blackboard.write_result result
    assert_equal result, blackboard.take_result
  end

  test "taking a result when all have been taken returns nil" do
    blackboard = DeepTest::SimpleTestBlackboard.new
    result = TestFactory.passed_result
    blackboard.write_result result
    blackboard.take_result
    assert_nil blackboard.take_result
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
deep_test-1.0.4 test/simple_test_blackboard_test.rb
deep_test-1.1.2 test/simple_test_blackboard_test.rb
deep_test-1.0.0 test/simple_test_blackboard_test.rb
deep_test-1.0.1 test/simple_test_blackboard_test.rb
deep_test-1.0.2 test/simple_test_blackboard_test.rb
deep_test-1.0.3 test/simple_test_blackboard_test.rb
deep_test-1.1.0 test/simple_test_blackboard_test.rb
deep_test-1.1.1 test/simple_test_blackboard_test.rb