Sha256: 75048a78ed8f8e8da0780b3cf49fee411facd8ea722a72e795cc6e97523c0cf7

Contents?: true

Size: 463 Bytes

Versions: 14

Compression:

Stored size: 463 Bytes

Contents

require 'spec_helper'

describe ProgressBar::RunningAverageCalculator do
  describe '.calculate' do
    it 'calculates properly' do
      ProgressBar::RunningAverageCalculator.calculate(4.5,  12,  0.1).should be_within(0.001).of  11.25
      ProgressBar::RunningAverageCalculator.calculate(8.2,  51,  0.7).should be_within(0.001).of  21.04
      ProgressBar::RunningAverageCalculator.calculate(41.8, 100, 0.59).should be_within(0.001).of 65.662
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ruby-progressbar-1.4.2 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.4.1 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.4.0 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.3.2 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.3.1 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.3.0 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.2.0 spec/lib/ruby-progressbar/running_average_calculator_spec.rb
ruby-progressbar-1.1.1 spec/progress_bar/running_average_calculator_spec.rb
ruby-progressbar-1.1.0 spec/progress_bar/running_average_calculator_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/ruby-progressbar-1.0.2/spec/progress_bar/running_average_calculator_spec.rb
ruby-progressbar-1.0.2 spec/progress_bar/running_average_calculator_spec.rb
ruby-progressbar-1.0.1 spec/progress_bar/running_average_calculator_spec.rb
ruby-progressbar-1.0.0 spec/progress_bar/running_average_calculator_spec.rb
ruby-progressbar-1.0.0rc1 spec/progress_bar/running_average_calculator_spec.rb