class SpecPositiveOperatorMatcher
Public Class Methods
new(actual)
click to toggle source
# File lib/mspec/matchers/base.rb, line 2 def initialize(actual) @actual = actual end
Public Instance Methods
<(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 13 def <(expected) unless @actual < expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to be less than #{expected.pretty_inspect}") end end
<=(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 20 def <=(expected) unless @actual <= expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to be less than or equal to #{expected.pretty_inspect}") end end
==(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 6 def ==(expected) unless @actual == expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to equal #{expected.pretty_inspect}") end end
=~(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 41 def =~(expected) unless @actual =~ expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to match #{expected.pretty_inspect}") end end
>(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 27 def >(expected) unless @actual > expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to be greater than #{expected.pretty_inspect}") end end
>=(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 34 def >=(expected) unless @actual >= expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "to be greater than or equal to #{expected.pretty_inspect}") end end