Sha256: a1ab7393945ef34bed679c36e48443ad2f8ed8b6b22a26be9a2644de9c142a46

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

require "minitest/autorun"
require "future"

class TestFuture < MiniTest::Test
  def test_future
    assert_kind_of Future, Future { 123 }
  end

  def test_value
    assert_equal 123, Future { 123 }.value
  end

  def test_all
    assert_equal [123, 456, 789], Future.all([
      Future { 123 },
      Future { 456 },
      Future { 789 },
    ]).value
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
future.rb-0.0.1 test/test_future.rb