Skip to content

Commit

Permalink
Add confidence helper tests.
Browse files Browse the repository at this point in the history
To cover a refactor.
  • Loading branch information
elliotcm committed Apr 24, 2012
1 parent e2c7074 commit 02b59b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/dashboard_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.