Sha256: 9e41a62655ccc2d2a5565290ad41d3c43cde9366d7de7967d197203eca861386

Contents?: true

Size: 537 Bytes

Versions: 13

Compression:

Stored size: 537 Bytes

Contents

require 'spec_helper'

describe SimpleDeploy::Backoff do
  describe 'exp_periods' do
    it 'should yield each period' do
      expected_periods = [1, 2, 4]

      i = 0
      SimpleDeploy::Backoff.exp_periods do |p|
        expected_periods[i].should == p
        i += 1
      end
    end

    it 'should generate and yield a specified number of periods' do
      expected_periods = [1, 2]

      i = 0
      SimpleDeploy::Backoff.exp_periods(2) do |p|
        expected_periods[i].should == p
        i += 1
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simple_deploy-0.7.1 spec/backoff_spec.rb
simple_deploy-0.7.0 spec/backoff_spec.rb
simple_deploy-0.6.7 spec/backoff_spec.rb
simple_deploy-0.6.6 spec/backoff_spec.rb
simple_deploy-0.6.5 spec/backoff_spec.rb
simple_deploy-0.6.4 spec/backoff_spec.rb
simple_deploy-0.6.3 spec/backoff_spec.rb
simple_deploy-0.6.2 spec/backoff_spec.rb
simple_deploy-0.6.1 spec/backoff_spec.rb
simple_deploy-0.6.0 spec/backoff_spec.rb
simple_deploy-0.5.6 spec/backoff_spec.rb
simple_deploy-0.5.5 spec/backoff_spec.rb
simple_deploy-0.5.4 spec/backoff_spec.rb