blob: 1cafb7d3a069f4119fea5bafa8c9f97cd10680b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require File.expand_path('../../../spec_helper', __FILE__)
describe "Fixnum#even?" do
it "is true for zero" do
0.even?.should be_true
end
it "is true for even positive Fixnums" do
4.even?.should be_true
end
it "is true for even negative Fixnums" do
(-4).even?.should be_true
end
it "is false for odd positive Fixnums" do
5.even?.should be_false
end
it "is false for odd negative Fixnums" do
(-5).even?.should be_false
end
end
|