Sha256: 8aadbf74b4fba18247f21f39d865634ea80b60f9aad99a7eff28dd8465f60c04

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

shared_examples_for "non-arithmetic means" do |mean_method|
  it "is nil when there are any zeroes" do
    data = [1.1, 0.0]
    Mean.send(mean_method, data).should be_nil
  end

  it "is nil when there are any negative numbers" do
    data = [1, -1]
    Mean.send(mean_method, data).should be_nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
means-1.2.5 spec/support/shared_examples_for_non_arithmetic_means.rb