class SpecNegativeOperatorMatcher
Public Class Methods
new(actual)
click to toggle source
# File lib/mspec/matchers/base.rb, line 50 def initialize(actual) @actual = actual end
Public Instance Methods
<(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 61 def <(expected) if @actual < expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to be less than #{expected.pretty_inspect}") end end
<=(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 68 def <=(expected) if @actual <= expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to be less than or equal to #{expected.pretty_inspect}") end end
==(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 54 def ==(expected) if @actual == expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to equal #{expected.pretty_inspect}") end end
=~(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 89 def =~(expected) if @actual =~ expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to match #{expected.pretty_inspect}") end end
>(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 75 def >(expected) if @actual > expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to be greater than #{expected.pretty_inspect}") end end
>=(expected)
click to toggle source
# File lib/mspec/matchers/base.rb, line 82 def >=(expected) if @actual >= expected SpecExpectation.fail_with("Expected #{@actual.pretty_inspect}", "not to be greater than or equal to #{expected.pretty_inspect}") end end