We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e164b0 commit 45c334eCopy full SHA for 45c334e
core/numeric/negative_spec.rb
@@ -0,0 +1,26 @@
1
+require File.expand_path('../../../spec_helper', __FILE__)
2
+
3
+ruby_version_is "2.3" do
4
+ describe "Numeric#negative?" do
5
+ describe "on positive numbers" do
6
+ it "returns false" do
7
+ 1.negative?.should be_false
8
+ 0.1.negative?.should be_false
9
+ end
10
11
12
+ describe "on zero" do
13
14
+ 0.negative?.should be_false
15
+ 0.0.negative?.should be_false
16
17
18
19
+ describe "on negative numbers" do
20
+ it "returns true" do
21
+ -1.negative?.should be_true
22
+ -0.1.negative?.should be_true
23
24
25
26
+end
0 commit comments