Permalink
Browse files

Add confidence helper tests.

To cover a refactor.
  • Loading branch information...
1 parent e2c7074 commit 02b59b0fbbab15718890a780c649f63f02faf5a7 @elliotcm elliotcm committed Apr 24, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 spec/dashboard_helpers_spec.rb
@@ -8,5 +8,13 @@
it 'should handle very small numbers' do
confidence_level(Complex(2e-18, -0.03)).should eql('No Change')
end
+
+ it "should consider a z-score of 1.96 < z < 2.57 as 95% confident" do
+ confidence_level(2.12).should eql('95% confidence')
+ end
+
+ it "should consider a z-score of -1.96 > z > -2.57 as 95% confident" do
+ confidence_level(-2.12).should eql('95% confidence')
+ end
end
-end
+end

0 comments on commit 02b59b0

Please sign in to comment.