Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 587e0b0137
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (45 sloc) 0.694 kB
assert('<', '15.3.3.2.1') do
class Foo
include Comparable
def <=>(x)
0
end
end
(Foo.new < Foo.new) == false
end
assert('<=', '15.3.3.2.2') do
class Foo
include Comparable
def <=>(x)
0
end
end
(Foo.new <= Foo.new) == true
end
assert('==', '15.3.3.2.3') do
class Foo
include Comparable
def <=>(x)
0
end
end
(Foo.new == Foo.new) == true
end
assert('>', '15.3.3.2.4') do
class Foo
include Comparable
def <=>(x)
0
end
end
(Foo.new > Foo.new) == false
end
assert('>=', '15.3.3.2.5') do
class Foo
include Comparable
def <=>(x)
0
end
end
(Foo.new >= Foo.new) == true
end
Jump to Line
Something went wrong with that request. Please try again.