Sha256: 37c97d5a5460aea12bba1f8721e9f0b0c89d6305669d3fef64fe568c21a4792f

Contents?: true

Size: 373 Bytes

Versions: 7

Compression:

Stored size: 373 Bytes

Contents

require 'test/unit'
require 'jr/cli/core_ext/enumerator'

class EnumerableTest < Test::Unit::TestCase
  sub_test_case '#size' do
    test 'returns number of elements' do
      enumerator = Enumerator.new do |yielder|
        yielder.yield 1
        yielder.yield 2
        yielder.yield 3
      end

      assert do
        enumerator.size == 3
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jr-cli-0.6.0 test/unit/core_ext/enumerator_test.rb
jr-cli-0.5.1 test/unit/core_ext/enumerator_test.rb
jr-cli-0.5.0 test/unit/core_ext/enumerator_test.rb
jr-cli-0.4.0 test/unit/core_ext/enumerator_test.rb
jr-cli-0.3.1 test/unit/core_ext/enumerator_test.rb
jr-cli-0.3.0 test/unit/core_ext/enumerator_test.rb
jr-cli-0.2.0 test/unit/core_ext/enumerator_test.rb