Sha256: 9e99aa2d65e8e7b2bfd1c43c2e682e27e521a6da0db86d1a9ce9a1dfae6e424c
Contents?: true
Size: 604 Bytes
Versions: 27
Compression:
Stored size: 604 Bytes
Contents
require 'test/unit' require 'promise/v2' class TestPromiseError < Test::Unit::TestCase def test_rejects_the_promise_with_the_given_error prom = PromiseV2.error(23) assert_equal(prom.error, 23) prom.rescue{} # Needed, otherwise we have an uncaught exception end def test_marks_the_promise_as_realized prom = PromiseV2.error(23) assert_equal(prom.realized?, true) prom.rescue{} # Needed, otherwise we have an uncaught exception end def test_marks_the_promise_as_rejected prom = PromiseV2.error(23) assert_equal(prom.rejected?, true) prom.rescue{} end end
Version data entries
27 entries across 27 versions & 1 rubygems