diff --git a/core/math/log10_spec.rb b/core/math/log10_spec.rb index c4daedcd5..f3bd7fd4b 100644 --- a/core/math/log10_spec.rb +++ b/core/math/log10_spec.rb @@ -23,6 +23,10 @@ -> { Math.log10("test") }.should raise_error(TypeError) end + it "raises a TypeError if passed a numerical argument as a string" do + -> { Math.log10("1.0") }.should raise_error(TypeError) + end + it "returns NaN given NaN" do Math.log10(nan_value).nan?.should be_true end