Sha256: 2bd892e17e93a6a4073bccdcebfd7b19d22f25551ca80e41ec587cacd72cf49d

Contents?: true

Size: 387 Bytes

Versions: 17

Compression:

Stored size: 387 Bytes

Contents

require 'rspec'
require 'abstractivator/numbers'

describe Numbers do
  describe '::from' do
    it 'returns a stream of numbers starting at the given number' do
      expect(Numbers.from(1).take(3)).to eql [1,2,3]
    end
    it 'accepts an interval' do
      expect(Numbers.from(0, 5).take(3)).to eql [0,5,10]
      expect(Numbers.from(3, -1).take(3)).to eql [3,2,1]
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
abstractivator-0.20.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.19.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.18.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.17.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.16.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.15.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.14.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.13.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.12.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.11.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.10.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.8.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.7.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.6.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.5.0 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.4.1 spec/lib/abstractivator/numbers_spec.rb
abstractivator-0.4.0 spec/lib/abstractivator/numbers_spec.rb