spec/probability_spec.rb in games_dice-0.3.3 vs spec/probability_spec.rb in games_dice-0.3.5
- old
+ new
@@ -102,9 +102,16 @@
# lambda { GamesDice::Probabilities.from_h( :foo ) }.should raise_error ArgumentError
lambda { GamesDice::Probabilities.from_h( { 7 => 0.5, 9 => 0.6 } ) }.should raise_error ArgumentError
end
end
+ describe "#implemented_in" do
+ it "should be either :c or :ruby" do
+ lang = GamesDice::Probabilities.implemented_in
+ lang.should be_a Symbol
+ [:c, :ruby].member?( lang ).should be_true
+ end
+ end
end # describe "class methods"
describe "instance methods" do
let(:pr2) { GamesDice::Probabilities.for_fair_die( 2 ) }
let(:pr4) { GamesDice::Probabilities.for_fair_die( 4 ) }