spec/unit/axiom/aggregate/variance/class_methods/call_spec.rb in axiom-0.1.1 vs spec/unit/axiom/aggregate/variance/class_methods/call_spec.rb in axiom-0.2.0
- old
+ new
@@ -17,36 +17,36 @@
let(:count) { values.count }
let(:mean) { 0.0 }
let(:sum_of_squares) { values.map { |value| value**2.0 }.reduce(:+) }
it 'returns the expected count' do
- subject.fetch(0).should be(count)
+ expect(subject.fetch(0)).to be(count)
end
it 'returns the expected mean' do
- subject.fetch(1).should == mean
+ expect(subject.fetch(1)).to eq(mean)
end
it 'returns the expected sum of squares' do
- subject.fetch(2).should == sum_of_squares
+ expect(subject.fetch(2)).to eq(sum_of_squares)
end
end
context 'when the values are nil' do
let(:values) { [nil] }
let(:count) { default.fetch(0) }
let(:mean) { default.fetch(1) }
let(:sum_of_squares) { default.fetch(2) }
it 'returns the default count' do
- subject.fetch(0).should be(count)
+ expect(subject.fetch(0)).to be(count)
end
it 'returns the default mean' do
- subject.fetch(1).should == mean
+ expect(subject.fetch(1)).to eq(mean)
end
it 'returns the default sum of squares' do
- subject.fetch(2).should == sum_of_squares
+ expect(subject.fetch(2)).to eq(sum_of_squares)
end
end
end