Sha256: ba7fc59861514a474b31cad8391e7be7c73551f35c683b659784ad479e014246

Contents?: true

Size: 537 Bytes

Versions: 26

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 = [2, 4, 8]

      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 = [2, 4]

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
simple_deploy-0.10.2 spec/backoff_spec.rb
simple_deploy-0.10.1 spec/backoff_spec.rb
simple_deploy-0.10.0 spec/backoff_spec.rb
simple_deploy-0.10.0.beta.3 spec/backoff_spec.rb
simple_deploy-0.10.0.beta.2 spec/backoff_spec.rb
simple_deploy-0.10.0.beta.1 spec/backoff_spec.rb
simple_deploy-0.9.2 spec/backoff_spec.rb
simple_deploy-0.9.1 spec/backoff_spec.rb
simple_deploy-0.9.0 spec/backoff_spec.rb
simple_deploy-0.8.2 spec/backoff_spec.rb
simple_deploy-0.8.2.beta1 spec/backoff_spec.rb
simple_deploy-0.8.1.beta1 spec/backoff_spec.rb
simple_deploy-0.8.0 spec/backoff_spec.rb
simple_deploy-0.7.8 spec/backoff_spec.rb
simple_deploy-0.7.7 spec/backoff_spec.rb
simple_deploy-0.7.7.beta.1 spec/backoff_spec.rb
simple_deploy-0.7.6 spec/backoff_spec.rb
simple_deploy-0.7.6.beta.6 spec/backoff_spec.rb
simple_deploy-0.7.6.beta.5 spec/backoff_spec.rb
simple_deploy-0.7.6.beta.3 spec/backoff_spec.rb